fix SleepPos conditions in residents and roommates Fn

This commit is contained in:
Marko Oldenburg 2020-03-08 08:29:19 +01:00
parent f8218646a7
commit 68f9f46fb5

View File

@ -1274,13 +1274,14 @@ sub EventProcessingRoommate($@) {
or $shutters->getShadingMode eq 'absent' or $shutters->getShadingMode eq 'absent'
) )
and ( $shutters->getStatus == $shutters->getClosedPos and ( $shutters->getStatus == $shutters->getClosedPos
or $shutters->getStatus == or $shutters->getStatus == $shutters->getSleepPos
$shutters->getShadingPos ) or $shutters->getStatus == $shutters->getShadingPos )
) )
{ {
$shutters->setLastDrive( $shutters->setLastDrive(
( (
$shutters->getStatus == $shutters->getClosedPos ( $shutters->getStatus == $shutters->getClosedPos
or $shutters->getStatus == $shutters->getSleepPos)
? 'roommate come home' ? 'roommate come home'
: 'shading out' : 'shading out'
) )
@ -1439,7 +1440,8 @@ sub EventProcessingResidents($@) {
my $getModeDown = $shutters->getModeDown; my $getModeDown = $shutters->getModeDown;
if ( if (
$shutters->getStatus != $shutters->getClosedPos ( $shutters->getStatus != $shutters->getClosedPos
or $shutters->getStatus != $shutters->getSleepPos )
and not $shutters->getIsDay and not $shutters->getIsDay
and $shutters->getRoommatesStatus eq 'none' and $shutters->getRoommatesStatus eq 'none'
and ( $getModeDown eq 'home' and ( $getModeDown eq 'home'
@ -1502,7 +1504,8 @@ sub EventProcessingResidents($@) {
and not $shutters->getSelfDefenseAbsent and not $shutters->getSelfDefenseAbsent
and $shutters->getSelfDefenseAbsentTimerrun ); and $shutters->getSelfDefenseAbsentTimerrun );
if ( $shutters->getStatus == $shutters->getClosedPos if ( ( $shutters->getStatus == $shutters->getClosedPos
or $shutters->getStatus == $shutters->getSleepPos )
and $shutters->getIsDay ) and $shutters->getIsDay )
{ {
$shutters->setHardLockOut('on') $shutters->setHardLockOut('on')
@ -1525,7 +1528,8 @@ sub EventProcessingResidents($@) {
} }
} }
elsif ( elsif (
$shutters->getStatus == $shutters->getClosedPos ( $shutters->getStatus == $shutters->getClosedPos
or $shutters->getStatus == $shutters->getSleepPos )
and $shutters->getIsDay and $shutters->getIsDay
and $shutters->getRoommatesStatus eq 'none' and $shutters->getRoommatesStatus eq 'none'
and ( $getModeUp eq 'home' and ( $getModeUp eq 'home'
@ -7905,7 +7909,7 @@ sub getblockAscDrivesAfterManual {
], ],
"release_status": "testing", "release_status": "testing",
"license": "GPL_2", "license": "GPL_2",
"version": "v0.8.17", "version": "v0.8.18",
"author": [ "author": [
"Marko Oldenburg <leongaultier@gmail.com>" "Marko Oldenburg <leongaultier@gmail.com>"
], ],