mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
update readings on change even if switched off
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@4439 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3961ef56c3
commit
ac3deed3f4
@ -233,9 +233,9 @@ PCA301_Parse($$)
|
||||
my $consumption = ($bytes[8]*256 + $bytes[9]) / 100.0;
|
||||
my $state = $state; $state = $power if( $readonly );
|
||||
readingsBeginUpdate($rhash);
|
||||
readingsBulkUpdate($rhash, "power", $power) if( $data != 0x00 || ReadingsVal($rname,"power",0) );
|
||||
readingsBulkUpdate($rhash, "consumption", $consumption) if( $data != 0x00 );
|
||||
readingsBulkUpdate($rhash, "state", $state) if( Value($rname) ne $state );
|
||||
readingsBulkUpdate($rhash, "power", $power) if( $power != ReadingsVal($rname,"power",0) );
|
||||
readingsBulkUpdate($rhash, "consumption", $consumption) if( $consumption != ReadingsVal($rname,"consumption",0) );
|
||||
readingsBulkUpdate($rhash, "state", $state) if( $state ne ReadingsVal($rname,"state","") );
|
||||
readingsEndUpdate($rhash,1);
|
||||
} elsif( $cmd eq 0x05 ) {
|
||||
$state = $data==0x00?"off":"on";
|
||||
|
Loading…
x
Reference in New Issue
Block a user