mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
BugFix for Sommer values.
git-svn-id: https://svn.fhem.de/fhem/trunk@1609 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
beb02ba405
commit
53de545c0e
@ -191,15 +191,20 @@ sub Twilight_GetUpdate{
|
||||
for(my $i=0;$i<6;$i++){
|
||||
($sunrise_set[$i]{RISE},$sunrise_set[$i]{SET})=
|
||||
twilight_calc($latitude,$longitude,$sunrise_set[$i]{DEGREE},$declination,$timezone,$midseconds,$timediff);
|
||||
readingsUpdate($hash,$sunrise_set[$i]{SR_NAME},strftime("%H:%M:%S",localtime($sunrise_set[$i]{RISE})));
|
||||
readingsUpdate($hash,$sunrise_set[$i]{SS_NAME},strftime("%H:%M:%S",localtime($sunrise_set[$i]{SET})));
|
||||
}
|
||||
readingsUpdate($hash, $sunrise_set[$i]{SR_NAME},
|
||||
$sunrise_set[$i]{RISE} eq "nan" ? "undefined" :
|
||||
strftime("%H:%M:%S",localtime($sunrise_set[$i]{RISE})));
|
||||
readingsUpdate($hash, $sunrise_set[$i]{SS_NAME},
|
||||
$sunrise_set[$i]{SET} eq "nan" ? "undefined" :
|
||||
strftime("%H:%M:%S",localtime($sunrise_set[$i]{SET})));
|
||||
}
|
||||
my $k=0;
|
||||
my $half="RISE";
|
||||
my $nexttime;
|
||||
my $licht;
|
||||
for(my $i=0;$i < 12;$i++){
|
||||
$nexttime=$sunrise_set[6-abs($i-6)-$k]{$half};
|
||||
next if($nexttime eq "undefined");
|
||||
if($nexttime > $now && $nexttime!=2000000000){
|
||||
readingsUpdate($hash,"light", 6-abs($i-6));
|
||||
if($i<6){
|
||||
|
Loading…
Reference in New Issue
Block a user