2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

at/watchdog bugfix

git-svn-id: https://svn.fhem.de/fhem/trunk@295 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2008-12-23 08:01:10 +00:00
parent 286a9f3ac6
commit a6e9f36d4d
3 changed files with 19 additions and 0 deletions

View File

@ -463,3 +463,4 @@
- feature: contrib/fhem2speech from Martin
- bugfix: attributes of at devices disappear
- feature: attribute rainadjustment for KS300 (Boris 2008-12-17)
- bugfix: deleting at / watchdog while active creates an empty device

View File

@ -12,6 +12,7 @@ at_Initialize($)
my ($hash) = @_;
$hash->{DefFn} = "at_Define";
$hash->{UndefFn} = "at_Undef";
$hash->{AttrFn} = "at_Attr";
$hash->{AttrList} = "disable:0,1 skip_next:0,1";
}
@ -75,6 +76,14 @@ at_Define($$)
return undef;
}
sub
at_Undef($$)
{
my ($hash, $name) = @_;
RemoveInternalTimer($name);
return undef;
}
sub
at_Exec($)
{

View File

@ -12,6 +12,7 @@ watchdog_Initialize($)
my ($hash) = @_;
$hash->{DefFn} = "watchdog_Define";
$hash->{UndefFn} = "watchdog_Undef";
$hash->{NotifyFn} = "watchdog_Notify";
$hash->{AttrList} = "disable:0,1";
}
@ -108,5 +109,13 @@ watchdog_Activate($)
InternalTimer($nt, "watchdog_Trigger", $ntfy, 0)
}
sub
watchdog_Undef($$)
{
my ($hash, $name) = @_;
RemoveInternalTimer($hash);
return undef;
}
1;