change condition in rain fn

geändert:       lib/FHEM/Automation/ShuttersControl.pm
This commit is contained in:
2020-07-08 10:45:49 +02:00
parent 11870789e1
commit b6bb0af471
2 changed files with 6 additions and 6 deletions

View File

@ -1789,17 +1789,17 @@ sub EventProcessingRain {
my $closedPos = $ascDev->getRainSensorShuttersClosedPos;
if ( $1 eq 'rain' ) { $val = $triggerMax + 1 }
elsif ( $1 eq 'dry' ) { $val = $triggerMin - 1 }
elsif ( $1 eq 'dry' ) { $val = $triggerMin }
else { $val = $1 }
RainProtection( $hash, $val, $triggerMax, $closedPos );
RainProtection( $hash, $val, $triggerMax, $triggerMin, $closedPos );
}
return;
}
sub RainProtection {
my ( $hash, $val, $triggerMax, $closedPos ) = @_;
my ( $hash, $val, $triggerMax, $triggerMin, $closedPos ) = @_;
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
$shutters->setShuttersDev($shuttersDev);
@ -1816,7 +1816,7 @@ sub RainProtection {
$shutters->setDriveCmd($closedPos);
$shutters->setRainProtectionStatus('protected');
}
elsif (( $val == 0 || $val < $shutters->getWindMin )
elsif (( $val == 0 || $val < $triggerMin )
&& $shutters->getStatus == $closedPos
&& IsAfterShuttersManualBlocking($shuttersDev)
&& $shutters->getRainProtectionStatus eq 'protected' )