add new object function to condition between the time

then shading in
This commit is contained in:
Marko Oldenburg 2020-07-09 12:26:52 +02:00
parent 4792dcea10
commit ed1325e735
3 changed files with 34 additions and 3 deletions

View File

@ -2,8 +2,8 @@ UPD 2020-07-09_11:10:47 97534 FHEM/73_AutoShuttersControl.pm
UPD 2020-07-09_11:10:47 74134 lib/FHEM/Automation/ShuttersControl.pm
UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2020-07-07_14:49:19 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2020-07-09_09:43:45 30760 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2020-07-09_11:19:33 23469 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2020-07-09_12:14:51 31376 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2020-07-09_12:26:35 23951 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2020-07-09_09:43:45 108076 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2020-07-09_11:13:13 44910 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm

View File

@ -195,6 +195,12 @@ sub ShadingProcessing {
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
my $brightness =
$FHEM::Automation::ShuttersControl::shutters->getBrightnessAverage;
$FHEM::Automation::ShuttersControl::shutters->setShadingBetweenTheTimeSuspend(
( IsInTime($FHEM::Automation::ShuttersControl::shutters->getShadingBetweenTheTime)
? 0
: 1 )
);
FHEM::Automation::ShuttersControl::ASC_Debug(
'ShadingProcessing: '
@ -465,8 +471,12 @@ sub ShadingProcessing {
)
&& $FHEM::Automation::ShuttersControl::shutters->getIfInShading
)
|| ( !$FHEM::Automation::ShuttersControl::shutters->getIfInShading
|| ( !$FHEM::Automation::ShuttersControl::shutters->getIfInShading
&& $FHEM::Automation::ShuttersControl::shutters->getStatus ==
$FHEM::Automation::ShuttersControl::shutters->getShadingPos
)
|| ( $FHEM::Automation::ShuttersControl::shutters->getShadingBetweenTheTimeSuspend
&& $FHEM::Automation::ShuttersControl::shutters->getStatus !=
$FHEM::Automation::ShuttersControl::shutters->getShadingPos )
)
);

View File

@ -936,6 +936,16 @@ sub setShadingLastPos {
return;
}
sub setShadingBetweenTheTimeSuspend { # Werte für value = 0, 1
my $self = shift;
my $value = shift;
$self->{ $self->{shuttersDev} }{ShadingBetweenTheTimeSuspend}{VAL} = $value
if ( defined($value) );
return;
}
sub setPushBrightnessInArray {
my $self = shift;
my $value = shift;
@ -988,6 +998,17 @@ sub getShadingStatus { # Werte für value = in, out, in reserved, out reserved
);
}
sub getShadingBetweenTheTimeSuspend { # Werte für value = 0, 1
my $self = shift;
return (
defined( $self->{ $self->{shuttersDev} }{ShadingBetweenTheTimeSuspend} )
&& defined( $self->{ $self->{shuttersDev} }{ShadingBetweenTheTimeSuspend}{VAL} )
? $self->{ $self->{shuttersDev} }{ShadingBetweenTheTimeSuspend}{VAL}
: 0
);
}
sub getShadingLastStatus { # Werte für value = in, out
my $self = shift;