diff --git a/73_AutoShuttersControl.pm b/73_AutoShuttersControl.pm index aee7d58..1cdb550 100644 --- a/73_AutoShuttersControl.pm +++ b/73_AutoShuttersControl.pm @@ -2374,42 +2374,50 @@ sub ShuttersCommandSet($$$) { $shutters->setShuttersDev($shuttersDev); if ( - $posValue != $shutters->getShadingPos - or ( $posValue == $shutters->getShadingPos - and CheckIfShuttersWindowRecOpen($shuttersDev) == 2 - and $shutters->getShuttersPlace eq 'terrace' - ) - and ( - ( - $shutters->getPartyMode eq 'on' - and $ascDev->getPartyMode eq 'on' - ) - or ( + ( + $posValue == $shutters->getShadingPos + and ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 - and $shutters->getSubTyp eq 'threestate' - and ( $ascDev->getAutoShuttersControlComfort eq 'off' - or $shutters->getComfortOpenPos != $posValue ) - and $shutters->getVentilateOpen eq 'on' - and $shutters->getShuttersPlace eq 'window' - and $shutters->getLockOut ne 'off' - ) - or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 - and $shutters->getSubTyp eq 'threestate' - and $ascDev->getAutoShuttersControlComfort eq 'on' - and $shutters->getVentilateOpen eq 'off' - and $shutters->getShuttersPlace eq 'window' - and $shutters->getLockOut ne 'off' ) - or ( - CheckIfShuttersWindowRecOpen($shuttersDev) == 2 + and $shutters->getShuttersPlace eq 'terrace' and ( $shutters->getLockOut eq 'soft' or $shutters->getLockOut eq 'hard' ) and not $shutters->getQueryShuttersPos($posValue) ) - or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 - and $shutters->getShuttersPlace eq 'terrace' - and not $shutters->getQueryShuttersPos($posValue) ) - or ( $shutters->getRainProtectionStatus eq 'protected' - and $shutters->getWindProtectionStatus eq 'protected' ) + ) + or ( + $posValue != $shutters->getShadingPos + and ( + ( + $shutters->getPartyMode eq 'on' + and $ascDev->getPartyMode eq 'on' + ) + or ( + CheckIfShuttersWindowRecOpen($shuttersDev) == 2 + and $shutters->getSubTyp eq 'threestate' + and ( $ascDev->getAutoShuttersControlComfort eq 'off' + or $shutters->getComfortOpenPos != $posValue ) + and $shutters->getVentilateOpen eq 'on' + and $shutters->getShuttersPlace eq 'window' + and $shutters->getLockOut ne 'off' + ) + or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 + and $shutters->getSubTyp eq 'threestate' + and $ascDev->getAutoShuttersControlComfort eq 'on' + and $shutters->getVentilateOpen eq 'off' + and $shutters->getShuttersPlace eq 'window' + and $shutters->getLockOut ne 'off' ) + or ( + CheckIfShuttersWindowRecOpen($shuttersDev) == 2 + and ( $shutters->getLockOut eq 'soft' + or $shutters->getLockOut eq 'hard' ) + and not $shutters->getQueryShuttersPos($posValue) + ) + or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 + and $shutters->getShuttersPlace eq 'terrace' + and not $shutters->getQueryShuttersPos($posValue) ) + or ( $shutters->getRainProtectionStatus eq 'protected' + and $shutters->getWindProtectionStatus eq 'protected' ) + ) ) ) {