mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 04:36:02 +00:00
readings update bug fix
git-svn-id: https://svn.fhem.de/fhem/trunk@3833 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
234d9c2821
commit
7aecfcc172
@ -209,8 +209,8 @@ PCA301_Parse($$)
|
||||
my $power = ($bytes[6]*256 + $bytes[7]) / 10.0;
|
||||
my $consumption = ($bytes[8]*256 + $bytes[9]) / 100.0;
|
||||
readingsBeginUpdate($rhash);
|
||||
readingsBulkUpdate($rhash, "power", $power) if( $data != 0x00 );
|
||||
readingsBulkUpdate($rhash, "consumption", $consumption) if( $data != 0x00 );
|
||||
readingsBulkUpdate($rhash, "power", $power) if( $data != 0x00 || ReadingsVal($rname,"power","") != $power );
|
||||
readingsBulkUpdate($rhash, "consumption", $consumption) if( ReadingsVal($rname,"consumption","") != $consumption );
|
||||
readingsBulkUpdate($rhash, "state", $state) if( Value($rname) ne $state );
|
||||
readingsEndUpdate($rhash,1);
|
||||
} elsif( $cmd eq 0x05 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user