2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 09:55:38 +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 a464c59d0b
commit 5b3f6fb4cf

View File

@ -1,4 +1,4 @@
# $Id$
# $Id$
##############################################################################
#
# 73_PRESENCE.pm
@ -42,6 +42,7 @@ PRESENCE_Initialize($)
$hash->{ReadFn} = "PRESENCE_Read";
$hash->{ReadyFn} = "PRESENCE_Ready";
$hash->{SetFn} = "PRESENCE_Set";
$hash->{StateFn} = "PRESENCE_State";
$hash->{DefFn} = "PRESENCE_Define";
$hash->{NotifyFn} = "PRESENCE_Notify";
$hash->{UndefFn} = "PRESENCE_Undef";
@ -264,6 +265,20 @@ PRESENCE_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
PRESENCE_Notify($$)