From fabeebeee78080ef0bb5361ae5c9bcc21b4e0bdc Mon Sep 17 00:00:00 2001 From: justme1968 Date: Mon, 2 Sep 2013 10:18:20 +0000 Subject: [PATCH] readings update bug fix git-svn-id: https://svn.fhem.de/fhem/trunk@3833 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 526e35aa7..24afa1b25 100644 --- a/fhem/FHEM/36_PCA301.pm +++ b/fhem/FHEM/36_PCA301.pm @@ -209,8 +209,8 @@ PCA301_Parse($$) my $power = ($bytes[6]*256 + $bytes[7]) / 10.0; my $consumption = ($bytes[8]*256 + $bytes[9]) / 100.0; readingsBeginUpdate($rhash); - readingsBulkUpdate($rhash, "power", $power) if( $data != 0x00 ); - readingsBulkUpdate($rhash, "consumption", $consumption) if( $data != 0x00 ); + readingsBulkUpdate($rhash, "power", $power) if( $data != 0x00 || ReadingsVal($rname,"power","") != $power ); + readingsBulkUpdate($rhash, "consumption", $consumption) if( ReadingsVal($rname,"consumption","") != $consumption ); readingsBulkUpdate($rhash, "state", $state) if( Value($rname) ne $state ); readingsEndUpdate($rhash,1); } elsif( $cmd eq 0x05 ) {