From fabb6710b3f7e24adc3ca2cb41a3e6e3e048df8a Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Sat, 9 Nov 2019 07:57:54 +0000 Subject: [PATCH] PRESENCE: add missing attributes "retryCount" and "retryInterval" to AttrList (Forum: #105104) git-svn-id: https://svn.fhem.de/fhem/trunk@20482 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 ++ fhem/FHEM/73_PRESENCE.pm | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 8b9b697dd..8c8ee94dd 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 73_PRESENCE: add missing attributes retryCount and retryInterval + to AttrList - change: 93_DbRep: commandref revised - feature: 93_DbRep: add option FullDay for timeDiffToNow and timeOlderThan, Forum: topic,53584.msg991139.html#msg991139 diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index dcfbc5cf9..2bbc84759 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -57,6 +57,8 @@ PRESENCE_Initialize($) "absenceTimeout ". "presenceTimeout ". "powerCmd ". + "retryInterval ". + "retryCount ". $readingFnAttributes; $hash->{AttrRenameMap} = { "ping_count" => "pingCount", @@ -558,7 +560,12 @@ PRESENCE_Attr(@) return "not a valid time frame value. See commandref for the correct syntax."; } } - + elsif($a[0] eq "set" and $a[2] =~ /^(retryInterval|retryCount)$/) + { + return $a[2]." must be a valid positive integer number" if($a[3] !~ /^\d+$/); + return $a[2]." is not applicable for mode '".$hash->{MODE}."'" if($hash->{MODE} =~ /^(event|lan-bluetooth)$/); + } + return undef; }