From 0f8479a6581e618c9bc25f84ef52272086b22114 Mon Sep 17 00:00:00 2001 From: dietmar63 <> Date: Fri, 2 Dec 2016 23:14:18 +0000 Subject: [PATCH] 59_Twilight: last change was not ok. revert git-svn-id: https://svn.fhem.de/fhem/trunk@12702 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/59_Twilight.pm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/fhem/FHEM/59_Twilight.pm b/fhem/FHEM/59_Twilight.pm index 49d2a752d..de7fbadbd 100644 --- a/fhem/FHEM/59_Twilight.pm +++ b/fhem/FHEM/59_Twilight.pm @@ -461,18 +461,13 @@ sub Twilight_WeatherTimerSet($) { my $now = time(); myRemoveInternalTimer ("weather", $hash); -# statt sr_weather und ss_weather 5 Minuten vor sr_naut und 65 Minuten vor ss_twilight - my $tim = $hash->{TW}{"sr_naut"}{TIME}; - if ($tim-5*60>$now+60) { # mehr als 1 Minute zur nächsten Abrufzeit - myInternalTimer ("weather", $tim-5*60, "Twilight_WeatherTimerUpdate", $hash, 0); + foreach my $key ("sr_weather", "ss_weather") { + my $tim = $hash->{TW}{$key}{TIME}; + if ($tim-60*60>$now+60) { + myInternalTimer ("weather", $tim-60*60, "Twilight_WeatherTimerUpdate", $hash, 0); last; } - my $tim = $hash->{TW}{"sr_twilight"}{TIME}; - if ($tim-65*60>$now+60) { # mehr als 1 Minute zur nächsten Abrufzeit - myInternalTimer ("weather", $tim-65*60, "Twilight_WeatherTimerUpdate", $hash, 0); - last; - } - + } } ################################################################################ sub Twilight_sunposTimerSet($) {