change logical for drive on shading then shutter pos is closed

change code in EventProcessingFunctions to call function
ShadingProcessingDriveCommand
This commit is contained in:
Marko Oldenburg 2020-08-06 09:38:07 +02:00
parent 0b4a5a0d4f
commit d1b04fcdce
3 changed files with 11 additions and 6 deletions

View File

@ -3,8 +3,8 @@ UPD 2020-07-26_17:36:29 74134 lib/FHEM/Automation/ShuttersControl.pm
UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2020-07-26_17:36:29 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2020-07-26_17:36:29 31376 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2020-07-26_17:36:29 24036 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2020-08-04_08:21:16 109101 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2020-08-06_09:35:41 24209 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2020-08-06_09:37:35 109110 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2020-07-26_17:36:29 44910 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2020-07-26_17:36:29 11569 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm

View File

@ -637,7 +637,7 @@ sub EventProcessingRoommate {
->getSelfDefenseState
)
{
ShadingProcessingDriveCommand( $hash, $shuttersDev );
ShadingProcessingDriveCommand( $hash, $shuttersDev, 1 );
}
elsif (
!$FHEM::Automation::ShuttersControl::shutters->getIsDay
@ -962,7 +962,7 @@ sub EventProcessingResidents {
&& $FHEM::Automation::ShuttersControl::shutters
->getRoommatesStatus eq 'none' )
{
ShadingProcessingDriveCommand( $hash, $shuttersDev );
ShadingProcessingDriveCommand( $hash, $shuttersDev, 1 );
}
elsif (
$FHEM::Automation::ShuttersControl::shutters
@ -1098,7 +1098,7 @@ sub EventProcessingResidents {
->getSelfDefenseState
)
{
ShadingProcessingDriveCommand( $hash, $shuttersDev );
ShadingProcessingDriveCommand( $hash, $shuttersDev, 1 );
}
elsif (
$FHEM::Automation::ShuttersControl::shutters->getShadingMode eq

View File

@ -513,6 +513,7 @@ sub ShadingProcessing {
sub ShadingProcessingDriveCommand {
my $hash = shift;
my $shuttersDev = shift;
my $marker = shift // 0;
my $name = $hash->{NAME};
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
@ -527,7 +528,11 @@ sub ShadingProcessingDriveCommand {
if ( IsInTime($FHEM::Automation::ShuttersControl::shutters->getShadingBetweenTheTime)
&& $FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'in'
&& $getShadingPos != $getStatus
&& $getStatus != $FHEM::Automation::ShuttersControl::shutters->getClosedPos
&& ( $getStatus != $FHEM::Automation::ShuttersControl::shutters->getClosedPos
|| ( $getStatus == $FHEM::Automation::ShuttersControl::shutters->getClosedPos
&& $marker
)
)
&& (
FHEM::Automation::ShuttersControl::CheckIfShuttersWindowRecOpen(
$shuttersDev) != 2