fix little bug then not use brightness
This commit is contained in:
parent
0e176974e1
commit
0e9e6653f6
@ -2055,14 +2055,16 @@ sub IsDay($$) {
|
|||||||
my ( $hash, $shuttersDev ) = @_;
|
my ( $hash, $shuttersDev ) = @_;
|
||||||
$shutters->setShuttersDev($shuttersDev);
|
$shutters->setShuttersDev($shuttersDev);
|
||||||
|
|
||||||
my $respIsDay;
|
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
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;
|
||||||
|
|
||||||
$respIsDay = ( ($shutters->getDown eq 'brightness' and $shutters->getBrightness > $shutters->getBrightnessMinVal and $isday) ? 1 : 0 );
|
$respIsDay = ( ($shutters->getBrightness > $shutters->getBrightnessMinVal and $isday) ? 1 : 0 )
|
||||||
|
if ( $shutters->getDown eq 'brightness' );
|
||||||
|
|
||||||
$respIsDay = ( (($shutters->getUp eq 'brightness' and $shutters->getBrightness > $shutters->getBrightnessMaxVal and not $isday) or $respIsDay) ? 1 : 0 );
|
$respIsDay = ( (($shutters->getBrightness > $shutters->getBrightnessMaxVal and not $isday) or $respIsDay) ? 1 : 0 )
|
||||||
|
if ( $shutters->getUp eq 'brightness' );
|
||||||
|
|
||||||
return $respIsDay;
|
return $respIsDay;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user