git-svn-id: https://svn.fhem.de/fhem/trunk@3862 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2013-09-05 13:40:21 +00:00
parent 01bd262a40
commit 69a69d9a7a

View File

@ -216,8 +216,8 @@ PCA301_Parse($$)
my $consumption = ($bytes[8]*256 + $bytes[9]) / 100.0; my $consumption = ($bytes[8]*256 + $bytes[9]) / 100.0;
$state = $power if( $readonly ); $state = $power if( $readonly );
readingsBeginUpdate($rhash); readingsBeginUpdate($rhash);
readingsBulkUpdate($rhash, "power", $power) if( $data != 0x00 || ReadingsVal($rname,"power","") != $power ); readingsBulkUpdate($rhash, "power", $power) if( $data != 0x00 || ReadingsVal($rname,"power",0) != $power );
readingsBulkUpdate($rhash, "consumption", $consumption) if( ReadingsVal($rname,"consumption","") != $consumption ); readingsBulkUpdate($rhash, "consumption", $consumption) if( ReadingsVal($rname,"consumption",0) != $consumption );
readingsBulkUpdate($rhash, "state", $state) if( Value($rname) ne $state ); readingsBulkUpdate($rhash, "state", $state) if( Value($rname) ne $state );
readingsEndUpdate($rhash,1); readingsEndUpdate($rhash,1);
} elsif( $cmd eq 0x05 ) { } elsif( $cmd eq 0x05 ) {