mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 07:24:21 +00:00
removal of stupid timer bug in 59_Twilight.pm
git-svn-id: https://svn.fhem.de/fhem/trunk@1382 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
640df47441
commit
39872762b2
@ -209,14 +209,14 @@ sub Twilight_GetUpdate($){
|
||||
}
|
||||
readingsUpdate($hash,"nextEventTime",strftime("%H:%M:%S",localtime($nexttime)));
|
||||
if($i==5 || $i==6){
|
||||
$nexttime = ($nexttime-$now)/5;
|
||||
$nexttime = ($nexttime-$now)/2;
|
||||
$nexttime=120 if($nexttime<120);
|
||||
$nexttime=900 if($nexttime>900);
|
||||
}else{
|
||||
$nexttime = $nexttime+10;
|
||||
}
|
||||
if(!$hash->{LOCAL}) {
|
||||
InternalTimer(sprintf("%.0f",$nexttime), "Twilight_GetUpdate", $hash, 0);
|
||||
InternalTimer(sprintf("%.0f",$now+$nexttime), "Twilight_GetUpdate", $hash, 0);
|
||||
}
|
||||
$hash->{STATE}=$i;
|
||||
last;
|
||||
|
Loading…
x
Reference in New Issue
Block a user