From 86450075d08f183cf23fdfd94f5c27bd6bbd3025 Mon Sep 17 00:00:00 2001 From: CoolTux Date: Thu, 28 Nov 2019 12:27:27 +0000 Subject: [PATCH] 73_AutoShuttersControl: fix selfdefense bug git-svn-id: https://svn.fhem.de/fhem/trunk@20609 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/73_AutoShuttersControl.pm | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 865b0fa7a..d52287ab6 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 73_AutoShuttersControl: fix selfdefense bug - bugfix: 73_AutoShuttersControl: fix time format problem - feature: 73_DoorBird: Videos File Format as Attribute - bugfix: 71_COE_Node: decimal for kWh fixed diff --git a/fhem/FHEM/73_AutoShuttersControl.pm b/fhem/FHEM/73_AutoShuttersControl.pm index b15288687..684f8cc22 100644 --- a/fhem/FHEM/73_AutoShuttersControl.pm +++ b/fhem/FHEM/73_AutoShuttersControl.pm @@ -1809,6 +1809,12 @@ sub EventProcessingBrightness($@) { and $shutters->getUp eq 'brightness' and not $shutters->getSunrise and $ascDev->getAutoShuttersControlMorning eq 'on' + and ( + $ascDev->getSelfDefense eq 'off' + or $shutters->getSelfDefenseMode eq 'off' + or ( $ascDev->getSelfDefense eq 'on' + and $ascDev->getResidentsStatus ne 'gone' ) + ) ) { Log3( $name, 4, @@ -1989,10 +1995,18 @@ sub EventProcessingBrightness($@) { } $shutters->setLastDrive($lastDrive); - $shutters->setSunrise(0); - $shutters->setSunset(1) - unless ( $shutters->getPrivacyDownStatus == 2 - or $posValue == $shutters->getStatus ); + + if ( $shutters->getPrivacyDownStatus != 2 + and $posValue != $shutters->getStatus ) + { + print( 'ASC_DEBUG!!! PrivacyStatus_2: ' + . $shutters->getPrivacyDownStatus + . ' Innerhalb der unless Abfrage' + . "\n" ); + $shutters->setSunrise(0); + $shutters->setSunset(1); + } + $shutters->setPrivacyDownStatus(0) if ( $shutters->getPrivacyDownStatus == 2 ); ShuttersCommandSet( $hash, $shuttersDev, $posValue ); @@ -7776,7 +7790,7 @@ sub getblockAscDrivesAfterManual { ], "release_status": "under develop", "license": "GPL_2", - "version": "v0.8.4", + "version": "v0.8.5", "author": [ "Marko Oldenburg " ],