From 024ae8e44cf2f175fbc525cde5b534343965443a Mon Sep 17 00:00:00 2001 From: unimatrix27 <> Date: Sun, 25 Mar 2012 18:57:53 +0000 Subject: [PATCH] Change in next update time detection. Now a light-change should takes effect immediately (in 59_Twilight.pm) git-svn-id: https://svn.fhem.de/fhem/trunk@1386 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/59_Twilight.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/59_Twilight.pm b/fhem/FHEM/59_Twilight.pm index 9aed6b7c4..a0cd79e97 100644 --- a/fhem/FHEM/59_Twilight.pm +++ b/fhem/FHEM/59_Twilight.pm @@ -213,10 +213,11 @@ sub Twilight_GetUpdate($){ $nexttime=120 if($nexttime<120); $nexttime=900 if($nexttime>900); }else{ - $nexttime = $nexttime+10; + $nexttime = $nexttime-$now+10; } if(!$hash->{LOCAL}) { InternalTimer(sprintf("%.0f",$now+$nexttime), "Twilight_GetUpdate", $hash, 0); + readingsUpdate($hash,"nextUpdate",strftime("%H:%M:%S",localtime($now+$nexttime))); } $hash->{STATE}=$i; last;