code review rain unprotection drive
This commit is contained in:
parent
459b8508ec
commit
527d72dd57
@ -1,11 +1,11 @@
|
|||||||
UPD 2022-03-24_09:53:42 116177 FHEM/73_AutoShuttersControl.pm
|
UPD 2022-04-07_21:31:16 116177 FHEM/73_AutoShuttersControl.pm
|
||||||
UPD 2022-04-06_09:20:00 76255 lib/FHEM/Automation/ShuttersControl.pm
|
UPD 2022-04-07_21:31:16 76255 lib/FHEM/Automation/ShuttersControl.pm
|
||||||
UPD 2022-01-14_08:49:13 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
UPD 2022-01-14_08:49:13 2691 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
||||||
UPD 2022-01-14_08:49:13 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
UPD 2022-01-14_08:49:13 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||||
UPD 2022-03-05_09:12:41 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
UPD 2022-03-05_09:12:41 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||||
UPD 2022-01-14_08:49:13 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm
|
UPD 2022-01-14_08:49:13 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm
|
||||||
UPD 2022-04-06_09:20:46 112362 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
UPD 2022-04-19_12:31:17 112421 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
||||||
UPD 2022-03-24_09:53:22 40705 lib/FHEM/Automation/ShuttersControl/Helper.pm
|
UPD 2022-04-07_21:31:16 40705 lib/FHEM/Automation/ShuttersControl/Helper.pm
|
||||||
UPD 2022-01-14_08:49:13 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
|
UPD 2022-01-14_08:49:13 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
|
||||||
UPD 2022-01-14_08:49:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
|
UPD 2022-01-14_08:49:13 11857 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
|
||||||
UPD 2022-01-14_08:49:13 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
|
UPD 2022-01-14_08:49:13 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
|
||||||
@ -13,4 +13,4 @@ UPD 2022-03-05_09:12:39 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.
|
|||||||
UPD 2022-01-14_08:49:13 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
|
UPD 2022-01-14_08:49:13 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
|
||||||
UPD 2022-01-14_08:49:13 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
|
UPD 2022-01-14_08:49:13 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
|
||||||
UPD 2022-01-14_08:49:13 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
|
UPD 2022-01-14_08:49:13 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
|
||||||
UPD 2022-01-14_08:49:13 7113 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
|
UPD 2022-04-19_12:28:00 7396 lib/FHEM/Automation/ShuttersControl/Rainprotection.pm
|
||||||
|
@ -1363,6 +1363,7 @@ sub EventProcessingWind {
|
|||||||
|
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
|
my $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
|
||||||
|
|
||||||
my $reading =
|
my $reading =
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading
|
$FHEM::Automation::ShuttersControl::ascDev->getWindSensorReading
|
||||||
@ -1414,33 +1415,39 @@ sub EventProcessingWind {
|
|||||||
{
|
{
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
$FHEM::Automation::ShuttersControl::shutters->setLastDrive(
|
||||||
'wind un-protected');
|
'wind un-protected');
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
|
|
||||||
(
|
if ( $FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
->getIfInShading
|
||||||
->getLastPos
|
&& $FHEM::Automation::ShuttersControl::shutters->getLastPos
|
||||||
: (
|
== $FHEM::Automation::ShuttersControl::shutters
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
->getShadingPos )
|
||||||
->getShuttersPlace eq 'awning'
|
{
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
$targetPos =
|
||||||
->getOpenPos
|
$FHEM::Automation::ShuttersControl::shutters->getOpenPos;
|
||||||
: (
|
}
|
||||||
|
else {
|
||||||
|
$targetPos =
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getLastPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getShuttersPlace ne 'awning' )
|
||||||
|
{
|
||||||
|
$targetPos = (
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getPrivacyDownStatus == 2
|
->getPrivacyDownStatus == 2
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
? $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getPrivacyDownPos
|
->getPrivacyDownPos
|
||||||
: (
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
|
||||||
->getSleepPos > 0
|
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
|
||||||
->getSleepPos
|
|
||||||
: $FHEM::Automation::ShuttersControl::shutters
|
: $FHEM::Automation::ShuttersControl::shutters
|
||||||
->getClosedPos
|
->getClosedPos
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
|
||||||
|
$targetPos);
|
||||||
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->setWindProtectionStatus('unprotected');
|
->setWindProtectionStatus('unprotected');
|
||||||
}
|
}
|
||||||
|
@ -154,6 +154,7 @@ sub _RainProtected {
|
|||||||
|
|
||||||
sub _RainUnprotected {
|
sub _RainUnprotected {
|
||||||
my $h = shift;
|
my $h = shift;
|
||||||
|
my $targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
|
||||||
|
|
||||||
my $shuttersDev = $h->{shuttersdevice};
|
my $shuttersDev = $h->{shuttersdevice};
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
@ -170,25 +171,31 @@ sub _RainUnprotected {
|
|||||||
->setRainUnprotectionDelayObj('none');
|
->setRainUnprotectionDelayObj('none');
|
||||||
}
|
}
|
||||||
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd(
|
if ( $FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
(
|
&& !$FHEM::Automation::ShuttersControl::shutters->getIfInShading
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
&& $FHEM::Automation::ShuttersControl::shutters->getLastPos ==
|
||||||
? $FHEM::Automation::ShuttersControl::shutters->getLastPos
|
$FHEM::Automation::ShuttersControl::shutters->getShadingPos )
|
||||||
: (
|
{
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getShuttersPlace
|
$targetPos = $FHEM::Automation::ShuttersControl::shutters->getOpenPos;
|
||||||
eq 'awning'
|
}
|
||||||
? $FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
else {
|
||||||
: (
|
$targetPos = $FHEM::Automation::ShuttersControl::shutters->getLastPos;
|
||||||
$FHEM::Automation::ShuttersControl::shutters
|
}
|
||||||
->getPrivacyDownStatus == 2
|
|
||||||
? $FHEM::Automation::ShuttersControl::shutters
|
if ( !$FHEM::Automation::ShuttersControl::shutters->getIsDay
|
||||||
->getPrivacyDownPos
|
&& $FHEM::Automation::ShuttersControl::shutters->getShuttersPlace ne
|
||||||
: $FHEM::Automation::ShuttersControl::shutters
|
'awning' )
|
||||||
->getClosedPos
|
{
|
||||||
)
|
$targetPos = (
|
||||||
)
|
$FHEM::Automation::ShuttersControl::shutters->getPrivacyDownStatus
|
||||||
)
|
== 2
|
||||||
) if ( IsAfterShuttersTimeBlocking($shuttersDev) );
|
? $FHEM::Automation::ShuttersControl::shutters->getPrivacyDownPos
|
||||||
|
: $FHEM::Automation::ShuttersControl::shutters->getClosedPos
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setDriveCmd($targetPos)
|
||||||
|
if ( IsAfterShuttersTimeBlocking($shuttersDev) );
|
||||||
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setRainProtectionStatus(
|
$FHEM::Automation::ShuttersControl::shutters->setRainProtectionStatus(
|
||||||
'unprotected');
|
'unprotected');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user