From 4454838eba7ea1ac54ad52d787b3a78608668596 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Sun, 22 Mar 2020 16:09:59 +0100 Subject: [PATCH] fix PrivacyDownStatus in Brightness --- 73_AutoShuttersControl.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/73_AutoShuttersControl.pm b/73_AutoShuttersControl.pm index ecb3d43..1b2b78a 100644 --- a/73_AutoShuttersControl.pm +++ b/73_AutoShuttersControl.pm @@ -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: '