From a4b57312e96b39583af6b02a36f6697c1ff7ec0b Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 9 Apr 2019 09:37:34 +0200 Subject: [PATCH] ShuttersSunrise --- 73_AutoShuttersControl.pm | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/73_AutoShuttersControl.pm b/73_AutoShuttersControl.pm index e93072b..ee007e4 100644 --- a/73_AutoShuttersControl.pm +++ b/73_AutoShuttersControl.pm @@ -47,7 +47,7 @@ use strict; use warnings; use FHEM::Meta; -my $version = '0.4.0.11beta60'; +my $version = '0.4.0.11beta61'; sub AutoShuttersControl_Initialize($) { my ($hash) = @_; @@ -2519,32 +2519,16 @@ sub ShuttersSunrise($$$) { ) ) { - $shuttersSunriseUnixtime += 86400 + $shuttersSunriseUnixtime = + ( $shuttersSunriseUnixtime + 86400 ) if ( $shuttersSunriseUnixtime < ( $oldFuncHash->{sunrisetime} + 180 ) and $oldFuncHash->{sunrisetime} < gettimeofday() ); } } - - $shuttersSunriseUnixtime += 86400 - if ( $shutters->getSunrise - and int( gettimeofday() / 86400 ) == int( - ( - computeAlignTime( - '24:00', - sunrise_abs( - $autoAstroMode, - 0, - $shutters->getTimeUpEarly, - $shutters->getTimeUpLate - ) - ) + 1 - ) / 86400 - ) - ); } elsif ( defined($oldFuncHash) and ref($oldFuncHash) eq 'HASH' ) { - $shuttersSunriseUnixtime += 86400 + $shuttersSunriseUnixtime = ( $shuttersSunriseUnixtime + 86400 ) if ( $shuttersSunriseUnixtime < ( $oldFuncHash->{sunrisetime} + 180 ) and $oldFuncHash->{sunrisetime} < gettimeofday() ); @@ -2588,11 +2572,6 @@ sub ShuttersSunrise($$$) { $shuttersSunriseUnixtime = computeAlignTime( '24:00', $shutters->getTimeUpWeHoliday ); - $shuttersSunriseUnixtime += 86400 - if ( $shutters->getSunrise - and int( gettimeofday() / 86400 ) == int( - computeAlignTime( '24:00', - $shutters->getTimeUpWeHoliday ) / 86400) ); } } else {