From d525701e8baa9fb48edc077f208ccd828569ea64 Mon Sep 17 00:00:00 2001 From: borisneubert <> Date: Sat, 21 Jan 2012 11:59:15 +0000 Subject: [PATCH] Readings update via CHANGED to fix a side effect from changes in DoTrigger from Oct 2011. git-svn-id: https://svn.fhem.de/fhem/trunk@1197 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/59_Weather.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/59_Weather.pm b/fhem/FHEM/59_Weather.pm index 45b87c7ae..b401dc536 100755 --- a/fhem/FHEM/59_Weather.pm +++ b/fhem/FHEM/59_Weather.pm @@ -62,11 +62,8 @@ sub Weather_UpdateReading($$$$$$) { my $name= $hash->{NAME}; Log 1, "Weather $name: $reading= $value"; - #if(!$hash->{LOCAL}) { - DoTrigger($name, ReadingsVal($name, $reading, "")); # if($init_done); - #} + $hash->{CHANGED}[$n]= "$key: $value"; - return 1; } @@ -107,6 +104,7 @@ sub Weather_GetUpdate($) foreach my $condition ( keys ( %$current ) ) { my $value= $current->{$condition}; Weather_UpdateReading($hash,"",$condition,$tn,$value,$n); + $n++; } my $fci= $WeatherObj->forecast_information; @@ -114,6 +112,7 @@ sub Weather_GetUpdate($) my $reading= $i; my $value= $fci->{$i}; Weather_UpdateReading($hash,"",$i,$tn,$value,$n); + $n++; } for(my $t= 0; $t<= 3; $t++) { @@ -122,6 +121,7 @@ sub Weather_GetUpdate($) foreach my $condition ( keys ( %$fcc ) ) { my $value= $fcc->{$condition}; Weather_UpdateReading($hash,$prefix,$condition,$tn,$value,$n); + $n++; } }