2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 13:24:56 +00:00

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
This commit is contained in:
unimatrix27 2012-03-25 18:57:53 +00:00
parent d7fa8878d6
commit 024ae8e44c

View File

@ -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;