From 3d3a3971dd40247494f36c0b54c1d7531f46773c Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Sat, 7 Sep 2013 08:39:27 +0000 Subject: [PATCH] allways write consumption of switched on git-svn-id: https://svn.fhem.de/fhem/trunk@3868 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/36_PCA301.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/36_PCA301.pm b/fhem/FHEM/36_PCA301.pm index b98a2ff47..8d7ce14c7 100644 --- a/fhem/FHEM/36_PCA301.pm +++ b/fhem/FHEM/36_PCA301.pm @@ -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 ) {