mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
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
This commit is contained in:
parent
9310fdced5
commit
d525701e8b
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user