ShuttersSunrise
This commit is contained in:
parent
0ea9631153
commit
a4b57312e9
@ -47,7 +47,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use FHEM::Meta;
|
use FHEM::Meta;
|
||||||
|
|
||||||
my $version = '0.4.0.11beta60';
|
my $version = '0.4.0.11beta61';
|
||||||
|
|
||||||
sub AutoShuttersControl_Initialize($) {
|
sub AutoShuttersControl_Initialize($) {
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
@ -2519,32 +2519,16 @@ sub ShuttersSunrise($$$) {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$shuttersSunriseUnixtime += 86400
|
$shuttersSunriseUnixtime =
|
||||||
|
( $shuttersSunriseUnixtime + 86400 )
|
||||||
if ( $shuttersSunriseUnixtime <
|
if ( $shuttersSunriseUnixtime <
|
||||||
( $oldFuncHash->{sunrisetime} + 180 )
|
( $oldFuncHash->{sunrisetime} + 180 )
|
||||||
and $oldFuncHash->{sunrisetime} < gettimeofday() );
|
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' ) {
|
elsif ( defined($oldFuncHash) and ref($oldFuncHash) eq 'HASH' ) {
|
||||||
$shuttersSunriseUnixtime += 86400
|
$shuttersSunriseUnixtime = ( $shuttersSunriseUnixtime + 86400 )
|
||||||
if ( $shuttersSunriseUnixtime <
|
if ( $shuttersSunriseUnixtime <
|
||||||
( $oldFuncHash->{sunrisetime} + 180 )
|
( $oldFuncHash->{sunrisetime} + 180 )
|
||||||
and $oldFuncHash->{sunrisetime} < gettimeofday() );
|
and $oldFuncHash->{sunrisetime} < gettimeofday() );
|
||||||
@ -2588,11 +2572,6 @@ sub ShuttersSunrise($$$) {
|
|||||||
$shuttersSunriseUnixtime =
|
$shuttersSunriseUnixtime =
|
||||||
computeAlignTime( '24:00',
|
computeAlignTime( '24:00',
|
||||||
$shutters->getTimeUpWeHoliday );
|
$shutters->getTimeUpWeHoliday );
|
||||||
$shuttersSunriseUnixtime += 86400
|
|
||||||
if ( $shutters->getSunrise
|
|
||||||
and int( gettimeofday() / 86400 ) == int(
|
|
||||||
computeAlignTime( '24:00',
|
|
||||||
$shutters->getTimeUpWeHoliday ) / 86400) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user