2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

allways write consumption of switched on

git-svn-id: https://svn.fhem.de/fhem/trunk@3868 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2013-09-07 08:39:27 +00:00
parent 61fa4ace9e
commit 3d3a3971dd

View File

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