From 2f3094a1aaf102f4213ecf90f858bc44c341f6bb Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Thu, 6 Aug 2020 12:41:12 +0000 Subject: [PATCH] 73_AutoShuttersControl: fix shading in drive then shutter is closed git-svn-id: https://svn.fhem.de/fhem/trunk@22548 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- .../EventProcessingFunctions.pm | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm b/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm index a6d2afe2a..60ce176bc 100644 --- a/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +++ b/fhem/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm @@ -368,6 +368,25 @@ sub EventProcessingWindowRec { } } } + elsif ( + !$FHEM::Automation::ShuttersControl::shutters->getIsDay + && $FHEM::Automation::ShuttersControl::shutters->getModeDown eq 'roommate' + && ( $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus eq 'home' + || $FHEM::Automation::ShuttersControl::shutters->getRoommatesStatus eq 'awoken' ) + ) + { + $FHEM::Automation::ShuttersControl::shutters + ->setDriveCmd( + ( + $FHEM::Automation::ShuttersControl::shutters + ->getVentilatePosAfterDayClosed eq 'open' + ? $FHEM::Automation::ShuttersControl::shutters + ->getOpenPos + : $FHEM::Automation::ShuttersControl::shutters + ->getLastManPos + ) + ); + } elsif ( $FHEM::Automation::ShuttersControl::shutters->getModeDown ne 'absent' @@ -618,7 +637,7 @@ sub EventProcessingRoommate { ->getSelfDefenseState ) { - ShadingProcessingDriveCommand( $hash, $shuttersDev ); + ShadingProcessingDriveCommand( $hash, $shuttersDev, 1 ); } elsif ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay @@ -943,7 +962,7 @@ sub EventProcessingResidents { && $FHEM::Automation::ShuttersControl::shutters ->getRoommatesStatus eq 'none' ) { - ShadingProcessingDriveCommand( $hash, $shuttersDev ); + ShadingProcessingDriveCommand( $hash, $shuttersDev, 1 ); } elsif ( $FHEM::Automation::ShuttersControl::shutters @@ -1079,7 +1098,7 @@ sub EventProcessingResidents { ->getSelfDefenseState ) { - ShadingProcessingDriveCommand( $hash, $shuttersDev ); + ShadingProcessingDriveCommand( $hash, $shuttersDev, 1 ); } elsif ( $FHEM::Automation::ShuttersControl::shutters->getShadingMode eq