change getMode logic
This commit is contained in:
parent
6b1cc2eb69
commit
3910a46c5d
@ -41,7 +41,7 @@ package main;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my $version = '0.4.0.9';
|
my $version = '0.4.0.10';
|
||||||
|
|
||||||
sub AutoShuttersControl_Initialize($) {
|
sub AutoShuttersControl_Initialize($) {
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
@ -886,9 +886,10 @@ sub EventProcessingRoommate($@) {
|
|||||||
and ( $shutters->getRoommatesStatus eq 'home'
|
and ( $shutters->getRoommatesStatus eq 'home'
|
||||||
or $shutters->getRoommatesStatus eq 'awoken' )
|
or $shutters->getRoommatesStatus eq 'awoken' )
|
||||||
and $ascDev->getAutoShuttersControlMorning eq 'on'
|
and $ascDev->getAutoShuttersControlMorning eq 'on'
|
||||||
|
and ( $shutters->getModeUp eq 'home'
|
||||||
and ( $shutters->getModeUp eq 'always'
|
or $shutters->getModeUp eq 'always'
|
||||||
or $shutters->getModeUp eq 'home' )
|
or $shutters->getModeDown eq 'home'
|
||||||
|
or $shutters->getModeDown eq 'always' )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Log3( $name, 4,
|
Log3( $name, 4,
|
||||||
@ -901,6 +902,8 @@ sub EventProcessingRoommate($@) {
|
|||||||
)
|
)
|
||||||
and IsDay( $hash, $shuttersDev )
|
and IsDay( $hash, $shuttersDev )
|
||||||
and IsAfterShuttersTimeBlocking( $hash, $shuttersDev )
|
and IsAfterShuttersTimeBlocking( $hash, $shuttersDev )
|
||||||
|
and ( $shutters->getModeUp eq 'home'
|
||||||
|
or $shutters->getModeUp eq 'always' )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Log3( $name, 4,
|
Log3( $name, 4,
|
||||||
@ -917,15 +920,14 @@ sub EventProcessingRoommate($@) {
|
|||||||
or $shutters->getRoommatesLastStatus eq 'gone'
|
or $shutters->getRoommatesLastStatus eq 'gone'
|
||||||
or $shutters->getRoommatesLastStatus eq 'home'
|
or $shutters->getRoommatesLastStatus eq 'home'
|
||||||
)
|
)
|
||||||
and ( $shutters->getModeUp eq 'home'
|
|
||||||
or $shutters->getModeUp eq 'always'
|
|
||||||
or $shutters->getModeDown eq 'home'
|
|
||||||
or $shutters->getModeDown eq 'always' )
|
|
||||||
and $shutters->getRoommatesStatus eq 'home'
|
and $shutters->getRoommatesStatus eq 'home'
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( not IsDay( $hash, $shuttersDev )
|
if ( not IsDay( $hash, $shuttersDev )
|
||||||
and IsAfterShuttersTimeBlocking( $hash, $shuttersDev ) )
|
and IsAfterShuttersTimeBlocking( $hash, $shuttersDev )
|
||||||
|
and ( $shutters->getModeDown eq 'home'
|
||||||
|
or $shutters->getModeDown eq 'always' )
|
||||||
|
)
|
||||||
{
|
{
|
||||||
my $position;
|
my $position;
|
||||||
$shutters->setLastDrive('roommate home');
|
$shutters->setLastDrive('roommate home');
|
||||||
@ -945,7 +947,9 @@ sub EventProcessingRoommate($@) {
|
|||||||
}
|
}
|
||||||
elsif ( IsDay( $hash, $shuttersDev )
|
elsif ( IsDay( $hash, $shuttersDev )
|
||||||
and $shutters->getStatus == $shutters->getClosedPos
|
and $shutters->getStatus == $shutters->getClosedPos
|
||||||
and IsAfterShuttersTimeBlocking( $hash, $shuttersDev ) )
|
and IsAfterShuttersTimeBlocking( $hash, $shuttersDev )
|
||||||
|
and ( $shutters->getModeUp eq 'home'
|
||||||
|
or $shutters->getModeUp eq 'always') )
|
||||||
{
|
{
|
||||||
$shutters->setLastDrive('roommate home');
|
$shutters->setLastDrive('roommate home');
|
||||||
ShuttersCommandSet( $hash, $shuttersDev,
|
ShuttersCommandSet( $hash, $shuttersDev,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user