From f67d56e1cc751e623f6641b57db1f84fcbd4b960 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 20 Jun 2022 15:56:47 +0200 Subject: [PATCH] expane rain and wind protection control add condition for wind and rain protection [Ticket: none] --- FHEM/73_AutoShuttersControl.pm | 2 +- controls_AutoShuttersControl.txt | 8 ++++---- lib/FHEM/Automation/ShuttersControl.pm | 6 +++++- .../ShuttersControl/EventProcessingFunctions.pm | 6 +++--- lib/FHEM/Automation/ShuttersControl/Rainprotection.pm | 6 +++--- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/FHEM/73_AutoShuttersControl.pm b/FHEM/73_AutoShuttersControl.pm index b45756d..0247d31 100644 --- a/FHEM/73_AutoShuttersControl.pm +++ b/FHEM/73_AutoShuttersControl.pm @@ -1462,7 +1462,7 @@ __END__ ], "release_status": "stable", "license": "GPL_2", - "version": "v0.10.23", + "version": "v0.10.24", "author": [ "Marko Oldenburg " ], diff --git a/controls_AutoShuttersControl.txt b/controls_AutoShuttersControl.txt index f692271..5a3a5bf 100644 --- a/controls_AutoShuttersControl.txt +++ b/controls_AutoShuttersControl.txt @@ -1,10 +1,10 @@ -UPD 2022-04-07_21:31:16 116177 FHEM/73_AutoShuttersControl.pm -UPD 2022-04-07_21:31:16 76255 lib/FHEM/Automation/ShuttersControl.pm +UPD 2022-06-20_15:54:48 116177 FHEM/73_AutoShuttersControl.pm +UPD 2022-06-20_12:59:11 76466 lib/FHEM/Automation/ShuttersControl.pm UPD 2022-01-14_08:49:13 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm UPD 2022-01-14_08:49:13 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm UPD 2022-03-05_09:12:41 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2022-01-14_08:49:13 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm -UPD 2022-04-19_12:31:17 112421 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +UPD 2022-06-20_15:50:59 112421 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2022-04-07_21:31:16 40705 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2022-01-14_08:49:13 2209 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2022-01-14_08:49:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm @@ -13,4 +13,4 @@ UPD 2022-03-05_09:12:39 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr. UPD 2022-01-14_08:49:13 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2022-01-14_08:49:13 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2022-01-14_08:49:13 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm -UPD 2022-04-19_12:28:00 7396 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +UPD 2022-06-20_15:49:47 7396 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm diff --git a/lib/FHEM/Automation/ShuttersControl.pm b/lib/FHEM/Automation/ShuttersControl.pm index 2e96e63..277326c 100644 --- a/lib/FHEM/Automation/ShuttersControl.pm +++ b/lib/FHEM/Automation/ShuttersControl.pm @@ -1764,7 +1764,11 @@ sub SetCmdFn { return if ( $shutters->getASCenable eq 'off' || $ascDev->getASCenable eq 'off' - || $idleDetection !~ m{^$idleDetectionValue$}xms ); + || $idleDetection !~ m{^$idleDetectionValue$}xms + || $FHEM::Automation::ShuttersControl::shutters + ->getWindProtectionStatus eq 'protected' + || $FHEM::Automation::ShuttersControl::shutters + ->getRaindProtectionStatus eq 'protected' ); if ( $shutters->getStatus != $posValue ) { $shutters->setLastPos( $shutters->getStatus ); diff --git a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm index 2744374..5a6b76c 100644 --- a/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm +++ b/lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm @@ -1445,11 +1445,11 @@ sub EventProcessingWind { ); } - $FHEM::Automation::ShuttersControl::shutters->setDriveCmd( - $targetPos); - $FHEM::Automation::ShuttersControl::shutters ->setWindProtectionStatus('unprotected'); + + $FHEM::Automation::ShuttersControl::shutters->setDriveCmd( + $targetPos); } FHEM::Automation::ShuttersControl::ASC_Debug( diff --git a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm index 48d8833..52e85d7 100644 --- a/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm +++ b/lib/FHEM/Automation/ShuttersControl/Rainprotection.pm @@ -194,12 +194,12 @@ sub _RainUnprotected { ); } - $FHEM::Automation::ShuttersControl::shutters->setDriveCmd($targetPos) - if ( IsAfterShuttersTimeBlocking($shuttersDev) ); - $FHEM::Automation::ShuttersControl::shutters->setRainProtectionStatus( 'unprotected'); + $FHEM::Automation::ShuttersControl::shutters->setDriveCmd($targetPos) + if ( IsAfterShuttersTimeBlocking($shuttersDev) ); + return; }