2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 14:16:42 +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:
unimatrix27 2012-03-25 09:48:21 +00:00
parent 640df47441
commit 39872762b2

View File

@ -209,14 +209,14 @@ sub Twilight_GetUpdate($){
} }
readingsUpdate($hash,"nextEventTime",strftime("%H:%M:%S",localtime($nexttime))); readingsUpdate($hash,"nextEventTime",strftime("%H:%M:%S",localtime($nexttime)));
if($i==5 || $i==6){ if($i==5 || $i==6){
$nexttime = ($nexttime-$now)/5; $nexttime = ($nexttime-$now)/2;
$nexttime=120 if($nexttime<120); $nexttime=120 if($nexttime<120);
$nexttime=900 if($nexttime>900); $nexttime=900 if($nexttime>900);
}else{ }else{
$nexttime = $nexttime+10; $nexttime = $nexttime+10;
} }
if(!$hash->{LOCAL}) { if(!$hash->{LOCAL}) {
InternalTimer(sprintf("%.0f",$nexttime), "Twilight_GetUpdate", $hash, 0); InternalTimer(sprintf("%.0f",$now+$nexttime), "Twilight_GetUpdate", $hash, 0);
} }
$hash->{STATE}=$i; $hash->{STATE}=$i;
last; last;