Compare commits

...

2 Commits

Author SHA1 Message Date
Marko Oldenburg
46eb9da8c8 code style 2020-03-22 16:13:58 +01:00
Marko Oldenburg
4454838eba fix PrivacyDownStatus in Brightness 2020-03-22 16:09:59 +01:00

View File

@ -1997,6 +1997,8 @@ sub EventProcessingBrightness($@) {
{
$posValue = $shutters->getComfortOpenPos;
$lastDrive = 'minimum brightness threshold fell below';
$shutters->setPrivacyDownStatus(0)
if ( $shutters->getPrivacyDownStatus == 2 );
}
elsif ( CheckIfShuttersWindowRecOpen($shuttersDev) == 0
or $shutters->getVentilateOpen eq 'off' )
@ -2007,10 +2009,14 @@ sub EventProcessingBrightness($@) {
: $shutters->getClosedPos
);
$lastDrive = 'minimum brightness threshold fell below';
$shutters->setPrivacyDownStatus(0)
if ( $shutters->getPrivacyDownStatus == 2 );
}
else {
$posValue = $shutters->getVentilatePos;
$lastDrive = 'minimum brightness threshold fell below';
$shutters->setPrivacyDownStatus(0)
if ( $shutters->getPrivacyDownStatus == 2 );
}
$shutters->setLastDrive($lastDrive);
@ -2025,9 +2031,6 @@ sub EventProcessingBrightness($@) {
$shutters->setSunset(1);
}
$shutters->setPrivacyDownStatus(0)
if ( $shutters->getPrivacyDownStatus == 2
and $shutters->getSunrise );
ShuttersCommandSet( $hash, $shuttersDev, $posValue );
ASC_Debug( 'EventProcessingBrightness: '
@ -5691,11 +5694,12 @@ sub getShadingStateChangeSunny {
->{sunny} = $sunny;
$self->{ $self->{shuttersDev} }->{ASC_Shading_StateChange_SunnyCloudy}
->{cloudy} = $cloudy;
$self->{ $self->{shuttersDev} }->{BrightnessAverageArray}->{MAXOBJECT} =
( defined($maxBrightnessAverageArrayObjects)
$self->{ $self->{shuttersDev} }->{BrightnessAverageArray}->{MAXOBJECT} = (
defined($maxBrightnessAverageArrayObjects)
and $maxBrightnessAverageArrayObjects ne 'none'
? $maxBrightnessAverageArrayObjects
: 3 );
: 3
);
return $self->{ $self->{shuttersDev} }
->{ASC_Shading_StateChange_SunnyCloudy}->{sunny};