add shutters->getShadingLastPos
for condition drivePos != ShadingLastPos
This commit is contained in:
parent
185fe7576b
commit
82934125fe
@ -1,12 +1,12 @@
|
||||
UPD 2020-07-02_18:03:03 96885 FHEM/73_AutoShuttersControl.pm
|
||||
UPD 2020-07-02_18:03:07 177284 lib/FHEM/Automation/ShuttersControl.pm
|
||||
UPD 2020-07-02_18:22:12 96885 FHEM/73_AutoShuttersControl.pm
|
||||
UPD 2020-07-02_18:22:12 177284 lib/FHEM/Automation/ShuttersControl.pm
|
||||
UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
||||
UPD 2020-07-02_18:03:03 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||
UPD 2020-07-02_14:47:17 30157 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||
UPD 2020-07-02_18:22:12 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||
UPD 2020-07-03_08:52:59 30710 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||
UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm
|
||||
UPD 2020-06-22_09:41:40 11454 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
|
||||
UPD 2020-06-22_09:41:40 7251 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
|
||||
UPD 2020-06-30_12:47:15 52390 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
|
||||
UPD 2020-07-02_18:14:12 52390 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
|
||||
UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
|
||||
UPD 2020-06-22_09:41:40 3972 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
|
||||
UPD 2020-06-22_09:41:40 2288 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm
|
||||
|
@ -334,6 +334,9 @@ sub ShadingProcessingDriveCommand {
|
||||
. ' und somit wird nun in die Position: '
|
||||
. $getShadingPos
|
||||
. ' zum Beschatten gefahren' );
|
||||
|
||||
$FHEM::Automation::ShuttersControl::shutters
|
||||
->setShadingLastPos($getShadingPos);
|
||||
}
|
||||
elsif ($FHEM::Automation::ShuttersControl::shutters->getShadingStatus eq 'out'
|
||||
&& $getShadingPos == $getStatus )
|
||||
@ -344,7 +347,8 @@ sub ShadingProcessingDriveCommand {
|
||||
$hash,
|
||||
$shuttersDev,
|
||||
(
|
||||
$getShadingPos == $FHEM::Automation::ShuttersControl::shutters->getLastPos
|
||||
($getShadingPos == $FHEM::Automation::ShuttersControl::shutters->getLastPos
|
||||
|| $getShadingPos == $FHEM::Automation::ShuttersControl::shutters->getShadingLastPos)
|
||||
? $FHEM::Automation::ShuttersControl::shutters->getOpenPos
|
||||
: (
|
||||
$FHEM::Automation::ShuttersControl::shutters->getQueryShuttersPos( $FHEM::Automation::ShuttersControl::shutters->getLastPos )
|
||||
|
@ -453,6 +453,35 @@ sub setAdvDelay {
|
||||
return;
|
||||
}
|
||||
|
||||
sub setWindProtectionStatus { # Werte protected, unprotected
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
|
||||
$self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL} = $value
|
||||
if ( defined($value) );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sub setRainProtectionStatus { # Werte protected, unprotected
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
|
||||
$self->{ $self->{shuttersDev} }->{RainProtection}->{VAL} = $value
|
||||
if ( defined($value) );
|
||||
return;
|
||||
}
|
||||
|
||||
sub setExternalTriggerStatus {
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
|
||||
$self->{ $self->{shuttersDev} }->{ASC_ExternalTrigger}->{event} = $value
|
||||
if ( defined($value) );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sub getExternalTriggerStatus {
|
||||
my $self = shift;
|
||||
|
||||
@ -697,6 +726,36 @@ sub getInTimerFuncHash {
|
||||
return $self->{ $self->{shuttersDev} }{inTimerFuncHash};
|
||||
}
|
||||
|
||||
sub getWindProtectionStatus { # Werte protected, unprotected
|
||||
my $self = shift;
|
||||
|
||||
return (
|
||||
(
|
||||
defined( $self->{ $self->{shuttersDev} }->{ASC_WindParameters} )
|
||||
&& defined(
|
||||
$self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL}
|
||||
)
|
||||
)
|
||||
? $self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL}
|
||||
: 'unprotected'
|
||||
);
|
||||
}
|
||||
|
||||
sub getRainProtectionStatus { # Werte protected, unprotected
|
||||
my $self = shift;
|
||||
|
||||
return (
|
||||
(
|
||||
defined( $self->{ $self->{shuttersDev} }->{RainProtection} )
|
||||
&& defined(
|
||||
$self->{ $self->{shuttersDev} }->{RainProtection}->{VAL}
|
||||
)
|
||||
)
|
||||
? $self->{ $self->{shuttersDev} }->{RainProtection}->{VAL}
|
||||
: 'unprotected'
|
||||
);
|
||||
}
|
||||
|
||||
sub getSunsetUnixTime {
|
||||
my $self = shift;
|
||||
|
||||
@ -867,30 +926,11 @@ sub setShadingManualDriveStatus {
|
||||
return;
|
||||
}
|
||||
|
||||
sub setWindProtectionStatus { # Werte protected, unprotected
|
||||
sub setShadingLastPos {
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
|
||||
$self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL} = $value
|
||||
if ( defined($value) );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sub setRainProtectionStatus { # Werte protected, unprotected
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
|
||||
$self->{ $self->{shuttersDev} }->{RainProtection}->{VAL} = $value
|
||||
if ( defined($value) );
|
||||
return;
|
||||
}
|
||||
|
||||
sub setExternalTriggerStatus {
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
|
||||
$self->{ $self->{shuttersDev} }->{ASC_ExternalTrigger}->{event} = $value
|
||||
$self->{ $self->{shuttersDev} }{ShadingLastPos}{VAL} = $value
|
||||
if ( defined($value) );
|
||||
|
||||
return;
|
||||
@ -983,36 +1023,6 @@ sub getIfInShading {
|
||||
);
|
||||
}
|
||||
|
||||
sub getWindProtectionStatus { # Werte protected, unprotected
|
||||
my $self = shift;
|
||||
|
||||
return (
|
||||
(
|
||||
defined( $self->{ $self->{shuttersDev} }->{ASC_WindParameters} )
|
||||
&& defined(
|
||||
$self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL}
|
||||
)
|
||||
)
|
||||
? $self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL}
|
||||
: 'unprotected'
|
||||
);
|
||||
}
|
||||
|
||||
sub getRainProtectionStatus { # Werte protected, unprotected
|
||||
my $self = shift;
|
||||
|
||||
return (
|
||||
(
|
||||
defined( $self->{ $self->{shuttersDev} }->{RainProtection} )
|
||||
&& defined(
|
||||
$self->{ $self->{shuttersDev} }->{RainProtection}->{VAL}
|
||||
)
|
||||
)
|
||||
? $self->{ $self->{shuttersDev} }->{RainProtection}->{VAL}
|
||||
: 'unprotected'
|
||||
);
|
||||
}
|
||||
|
||||
sub getShadingStatusTimestamp {
|
||||
my $self = shift;
|
||||
|
||||
@ -1036,6 +1046,20 @@ sub getShadingLastStatusTimestamp {
|
||||
: 0
|
||||
);
|
||||
}
|
||||
|
||||
sub getShadingLastPos {
|
||||
my $self = shift;
|
||||
|
||||
return (
|
||||
defined( $self->{ $self->{shuttersDev} }{ShadingLastPos} )
|
||||
&& defined(
|
||||
$self->{ $self->{shuttersDev} }{ShadingLastPos}{VAL}
|
||||
)
|
||||
? $self->{ $self->{shuttersDev} }{ShadingLastPos}{VAL}
|
||||
: $FHEM::Automation::ShuttersControl::shutters->getShadingPos
|
||||
);
|
||||
}
|
||||
|
||||
### Ende Beschattung
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user