bugfix shutters drive then terrace door is open, set Attribut ASC_ShuttersPlace to terrace

This commit is contained in:
Marko Oldenburg
2019-01-23 10:00:47 +01:00
parent 89303a33b9
commit 9f8484263a

View File

@ -1524,19 +1524,29 @@ sub ShuttersCommandSet($$$) {
); );
if ( if (
$posValue != $shutters->getShadingPos (
and ( $shutters->getPartyMode eq 'on' $posValue != $shutters->getShadingPos
and $ascDev->getPartyMode eq 'on' ) or $shutters->getShuttersPlace eq 'terrace'
or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 )
and $shutters->getSubTyp eq 'threestate' and (
and $ascDev->getAutoShuttersControlComfort eq 'off' (
and $shutters->getVentilateOpen eq 'on' ) $shutters->getPartyMode eq 'on'
or ( and $ascDev->getPartyMode eq 'on'
CheckIfShuttersWindowRecOpen($shuttersDev) == 2 )
and ( $shutters->getLockOut eq 'soft' or (
or $shutters->getLockOut eq 'hard' ) CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and $ascDev->getHardLockOut eq 'on' and $shutters->getSubTyp eq 'threestate'
and not $queryShuttersPosValue and ( $ascDev->getAutoShuttersControlComfort eq 'off'
or $shutters->getComfortOpenPos != $posValue )
and $shutters->getVentilateOpen eq 'on'
)
or (
CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and ( $shutters->getLockOut eq 'soft'
or $shutters->getLockOut eq 'hard' )
and $ascDev->getHardLockOut eq 'on'
and not $queryShuttersPosValue
)
) )
) )
{ {
@ -2537,7 +2547,8 @@ sub setDriveCmd {
$offSet = $shutters->getOffset if ( $shutters->getOffset > 0 ); $offSet = $shutters->getOffset if ( $shutters->getOffset > 0 );
$offSet = $ascDev->getShuttersOffset if ( $shutters->getOffset == -1 ); $offSet = $ascDev->getShuttersOffset if ( $shutters->getOffset == -1 );
InternalTimer( gettimeofday() + int( rand($offSet) + $shutters->getOffsetStart ), InternalTimer(
gettimeofday() + int( rand($offSet) + $shutters->getOffsetStart ),
'AutoShuttersControl::SetCmdFn', \%h ) 'AutoShuttersControl::SetCmdFn', \%h )
if ( $offSet > 0 and not $shutters->getNoOffset ); if ( $offSet > 0 and not $shutters->getNoOffset );
AutoShuttersControl::SetCmdFn( \%h ) AutoShuttersControl::SetCmdFn( \%h )
@ -2970,7 +2981,11 @@ sub getOffset {
sub getOffsetStart { sub getOffsetStart {
my $self = shift; my $self = shift;
return ( AttrVal( $self->{shuttersDev}, 'ASC_Drive_OffsetStart', 5) > 4 ? AttrVal( $self->{shuttersDev}, 'ASC_Drive_OffsetStart', 5) : 5 ); return (
AttrVal( $self->{shuttersDev}, 'ASC_Drive_OffsetStart', 5 ) > 4
? AttrVal( $self->{shuttersDev}, 'ASC_Drive_OffsetStart', 5 )
: 5
);
} }
sub getBlockingTimeAfterManual { sub getBlockingTimeAfterManual {