change Code for rain protection
This commit is contained in:
parent
c1b71c12b4
commit
f5004dbc93
@ -13,4 +13,4 @@ UPD 2021-01-29_10:06:33 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.
|
||||
UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
|
||||
UPD 2021-01-29_10:06:33 3980 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
|
||||
UPD 2020-06-22_09:41:40 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
|
||||
UPD 2021-05-18_09:31:52 5957 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
|
||||
UPD 2021-05-18_09:57:48 6195 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
|
||||
|
@ -79,27 +79,27 @@ sub RainProcessing {
|
||||
&& $FHEM::Automation::ShuttersControl::shutters->getStatus !=
|
||||
$rainClosedPos
|
||||
&& $FHEM::Automation::ShuttersControl::shutters
|
||||
->getRainProtectionStatus eq 'unprotected' )
|
||||
->getRainProtectionStatus eq 'unprotected'
|
||||
|| ( $FHEM::Automation::ShuttersControl::shutters
|
||||
->getRainProtectionStatus eq 'unprotected'
|
||||
&& $FHEM::Automation::ShuttersControl::shutters
|
||||
->getRainUnprotectionDelayObj ne 'none')
|
||||
)
|
||||
{
|
||||
_RainProtected();
|
||||
}
|
||||
elsif ( ( $val == 0 || $val < $triggerMin )
|
||||
&& $FHEM::Automation::ShuttersControl::shutters->getStatus ==
|
||||
$rainClosedPos
|
||||
$rainClosedPos
|
||||
&& IsAfterShuttersManualBlocking($shuttersDev)
|
||||
&& $FHEM::Automation::ShuttersControl::shutters
|
||||
->getRainProtectionStatus eq 'protected' )
|
||||
->getRainProtectionStatus eq 'protected' )
|
||||
{
|
||||
my %funcHash = (
|
||||
shuttersdevice => $shuttersDev,
|
||||
);
|
||||
|
||||
::RemoveInternalTimer($FHEM::Automation::ShuttersControl::shutters->getRainUnprotectionDelayObj)
|
||||
if($FHEM::Automation::ShuttersControl::shutters->getRainUnprotectionDelayObj ne 'none');
|
||||
|
||||
$FHEM::Automation::ShuttersControl::shutters->getRainUnprotectionDelayObj;
|
||||
$FHEM::Automation::ShuttersControl::shutters->setRainUnprotectionDelayObj(\%funcHash);
|
||||
|
||||
$FHEM::Automation::ShuttersControl::shutters->setRainUnprotectionDelayObj(\%funcHash);
|
||||
::InternalTimer( ::gettimeofday() + $FHEM::Automation::ShuttersControl::ascDev->getRainWaitingTime
|
||||
, \&_RainUnprotected
|
||||
, \%funcHash );
|
||||
@ -114,6 +114,11 @@ sub RainProcessing {
|
||||
|
||||
### es muss noch beobachtet werden ob die Auswahl des Rollos welches bearbeitet werden soll bestehen bleibt oder mit in die neuen Funktionen übergeben werden muss
|
||||
sub _RainProtected {
|
||||
::RemoveInternalTimer($FHEM::Automation::ShuttersControl::shutters->getRainUnprotectionDelayObj)
|
||||
if($FHEM::Automation::ShuttersControl::shutters->getRainUnprotectionDelayObj ne 'none');
|
||||
|
||||
$FHEM::Automation::ShuttersControl::shutters->setRainUnprotectionDelayObj('none');
|
||||
|
||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||
'rain protected');
|
||||
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
|
||||
|
Loading…
Reference in New Issue
Block a user