fix partyMode and window open condition

This commit is contained in:
Marko Oldenburg 2019-09-20 20:35:48 +02:00
parent 07c3a5d634
commit 8035f9a5c6

View File

@ -1178,7 +1178,8 @@ sub EventProcessingRoommate($@) {
and $getRoommatesStatus eq 'home' and $getRoommatesStatus eq 'home'
) )
{ {
if ( not $shutters->getIsDay if (
not $shutters->getIsDay
and IsAfterShuttersTimeBlocking($shuttersDev) and IsAfterShuttersTimeBlocking($shuttersDev)
and ( $getModeDown eq 'home' and ( $getModeDown eq 'home'
or $getModeDown eq 'always' ) or $getModeDown eq 'always' )
@ -2408,15 +2409,16 @@ sub ShuttersCommandSet($$$) {
my $name = $hash->{NAME}; my $name = $hash->{NAME};
$shutters->setShuttersDev($shuttersDev); $shutters->setShuttersDev($shuttersDev);
if ( if (($posValue == $shutters->getShadingPos
$posValue != $shutters->getShadingPos and (
or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
$posValue == $shutters->getShadingPos
and CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and $shutters->getShuttersPlace eq 'terrace' and $shutters->getShuttersPlace eq 'terrace'
and ( $shutters->getLockOut eq 'soft' and ( $shutters->getLockOut eq 'soft'
or $shutters->getLockOut eq 'hard' ) or $shutters->getLockOut eq 'hard' )
and not $shutters->getQueryShuttersPos($posValue)
) )
)
or ($posValue != $shutters->getShadingPos
and ( and (
( (
$shutters->getPartyMode eq 'on' $shutters->getPartyMode eq 'on'
@ -2450,6 +2452,7 @@ sub ShuttersCommandSet($$$) {
and $shutters->getWindProtectionStatus eq 'protected' ) and $shutters->getWindProtectionStatus eq 'protected' )
) )
) )
)
{ {
$shutters->setDelayCmd($posValue); $shutters->setDelayCmd($posValue);
$ascDev->setDelayCmdReading; $ascDev->setDelayCmdReading;