fix IsDay then brightness
This commit is contained in:
@ -2485,6 +2485,8 @@ sub IsDay($$) {
|
|||||||
my $isday = ( ShuttersSunrise( $hash, $shuttersDev, 'unix' ) >
|
my $isday = ( ShuttersSunrise( $hash, $shuttersDev, 'unix' ) >
|
||||||
ShuttersSunset( $hash, $shuttersDev, 'unix' ) ? 1 : 0 );
|
ShuttersSunset( $hash, $shuttersDev, 'unix' ) ? 1 : 0 );
|
||||||
my $respIsDay = $isday;
|
my $respIsDay = $isday;
|
||||||
|
|
||||||
|
printf 'IsDay ist: ' . $respIsDay . "\n";
|
||||||
|
|
||||||
$respIsDay = (
|
$respIsDay = (
|
||||||
(
|
(
|
||||||
@ -2493,8 +2495,10 @@ sub IsDay($$) {
|
|||||||
and $isday
|
and $isday
|
||||||
)
|
)
|
||||||
or $shutters->getSunset
|
or $shutters->getSunset
|
||||||
) ? 1 : 0
|
) ? 0 : 1
|
||||||
) if ( $shutters->getDown eq 'brightness' );
|
) if ( $shutters->getDown eq 'brightness' );
|
||||||
|
|
||||||
|
printf 'IsDay Sunset ist: ' . $respIsDay . "\n";
|
||||||
|
|
||||||
$respIsDay = (
|
$respIsDay = (
|
||||||
(
|
(
|
||||||
@ -2506,6 +2510,8 @@ sub IsDay($$) {
|
|||||||
or $shutters->getSunrise
|
or $shutters->getSunrise
|
||||||
) ? 1 : 0
|
) ? 1 : 0
|
||||||
) if ( $shutters->getUp eq 'brightness' );
|
) if ( $shutters->getUp eq 'brightness' );
|
||||||
|
|
||||||
|
printf 'IsDay Sunrise ist: ' . $respIsDay . "\n";
|
||||||
|
|
||||||
return $respIsDay;
|
return $respIsDay;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user