mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +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:
parent
61fa4ace9e
commit
3d3a3971dd
@ -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 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user