Readings update via CHANGED to fix a side effect from changes in DoTrigger from Oct 2011.
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1197 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -62,10 +62,7 @@ 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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user