2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 23:06:37 +00:00

73_PRESENCE.pm: inactive

git-svn-id: https://svn.fhem.de/fhem/trunk@28456 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jowiemann 2024-02-01 12:55:10 +00:00
parent 0f517438f4
commit 4262537e11

View File

@ -1,4 +1,4 @@
# $Id$ # $Id$
############################################################################## ##############################################################################
# #
# 73_PRESENCE.pm # 73_PRESENCE.pm
@ -42,6 +42,7 @@ PRESENCE_Initialize($)
$hash->{ReadFn} = "PRESENCE_Read"; $hash->{ReadFn} = "PRESENCE_Read";
$hash->{ReadyFn} = "PRESENCE_Ready"; $hash->{ReadyFn} = "PRESENCE_Ready";
$hash->{SetFn} = "PRESENCE_Set"; $hash->{SetFn} = "PRESENCE_Set";
$hash->{StateFn} = "PRESENCE_State";
$hash->{DefFn} = "PRESENCE_Define"; $hash->{DefFn} = "PRESENCE_Define";
$hash->{NotifyFn} = "PRESENCE_Notify"; $hash->{NotifyFn} = "PRESENCE_Notify";
$hash->{UndefFn} = "PRESENCE_Undef"; $hash->{UndefFn} = "PRESENCE_Undef";
@ -264,6 +265,20 @@ PRESENCE_Undef($$)
return undef; return undef;
} }
#####################################
sub
PRESENCE_State($$$$)
{
my ($hash, $tim, $vt, $val) = @_;
$hash->{STATE} = $val if($vt eq "STATE" && !$init_done);
return undef if($vt ne "state" || $val ne "disabled");
$hash->{helper}{DISABLED} = 1;
readingsSingleUpdate($hash, "state", "disabled", 1);
return undef;
}
##################################### #####################################
sub sub
PRESENCE_Notify($$) PRESENCE_Notify($$)