add delete and shutdown Fn
need to delete all Shutter timer then ASC delete geändert: FHEM/73_AutoShuttersControl.pm geändert: lib/FHEM/Automation/ShuttersControl.pm
This commit is contained in:
parent
924363fe18
commit
8812be8fca
@ -73,12 +73,14 @@ sub Initialize {
|
||||
|
||||
## Da ich mit package arbeite müssen in die Initialize für die jeweiligen hash Fn Funktionen der Funktionsname
|
||||
# und davor mit :: getrennt der eigentliche package Name des Modules
|
||||
$hash->{SetFn} = \&FHEM::Automation::ShuttersControl::Set;
|
||||
$hash->{GetFn} = \&FHEM::Automation::ShuttersControl::Get;
|
||||
$hash->{DefFn} = \&FHEM::Automation::ShuttersControl::Define;
|
||||
$hash->{NotifyFn} = \&FHEM::Automation::ShuttersControl::Notify;
|
||||
$hash->{UndefFn} = \&FHEM::Automation::ShuttersControl::Undef;
|
||||
$hash->{AttrList} =
|
||||
$hash->{SetFn} = \&FHEM::Automation::ShuttersControl::Set;
|
||||
$hash->{GetFn} = \&FHEM::Automation::ShuttersControl::Get;
|
||||
$hash->{DefFn} = \&FHEM::Automation::ShuttersControl::Define;
|
||||
$hash->{NotifyFn} = \&FHEM::Automation::ShuttersControl::Notify;
|
||||
$hash->{UndefFn} = \&FHEM::Automation::ShuttersControl::Undef;
|
||||
$hash->{DeleteFn} = \&FHEM::Automation::ShuttersControl::Delete;
|
||||
$hash->{ShutdownFn} = \&FHEM::Automation::ShuttersControl::Shutdown;
|
||||
$hash->{AttrList} =
|
||||
'ASC_tempSensor '
|
||||
. 'ASC_brightnessDriveUpDown '
|
||||
. 'ASC_autoShuttersControlMorning:on,off '
|
||||
|
@ -1,5 +1,5 @@
|
||||
UPD 2020-07-03_11:29:10 96885 FHEM/73_AutoShuttersControl.pm
|
||||
UPD 2020-07-03_11:30:01 177284 lib/FHEM/Automation/ShuttersControl.pm
|
||||
UPD 2020-07-03_13:18:05 97041 FHEM/73_AutoShuttersControl.pm
|
||||
UPD 2020-07-03_13:26:42 177740 lib/FHEM/Automation/ShuttersControl.pm
|
||||
UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
||||
UPD 2020-07-03_11:29:10 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||
UPD 2020-07-03_11:29:10 30710 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||
|
@ -388,6 +388,23 @@ sub Undef {
|
||||
return;
|
||||
}
|
||||
|
||||
sub Delete {
|
||||
my $hash = shift;
|
||||
my $name = shift;
|
||||
|
||||
RemoveShuttersTimer();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sub Shutdown {
|
||||
my $hash = shift;
|
||||
|
||||
RemoveShuttersTimer();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sub Notify {
|
||||
my $hash = shift // return;
|
||||
my $dev = shift // return;
|
||||
@ -4718,4 +4735,18 @@ sub _CheckShuttersConditionsForShadingFn {
|
||||
readingsEndUpdate( $shuttersDevHash, 1 );
|
||||
}
|
||||
|
||||
sub RemoveShuttersTimer {
|
||||
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
||||
$shutters->setShuttersDev($shuttersDev);
|
||||
|
||||
RemoveInternalTimer( $shutters->getInTimerFuncHash );
|
||||
$shutters->setInTimerFuncHash(undef);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user