From 26fc74ea30273bd1bce25c9769ed1d989abf63a0 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 26 Jan 2022 10:04:13 +0000 Subject: [PATCH] fhem.pl: add setDisableNotifyFn (Forum #125381) git-svn-id: https://svn.fhem.de/fhem/trunk@25563 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 8437daa54..a8ac45845 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -155,6 +155,7 @@ sub setGlobalAttrBeforeFork($); sub setReadingsVal($$$$); sub setAttrList($$); sub setDevAttrList($;$); +sub setDisableNotifyFn($$); sub setNotifyDev($$); sub toJSON($); sub utf8ToLatin1($); @@ -5606,6 +5607,20 @@ notifyRegexpChanged($$;$) } } +sub +setDisableNotifyFn($$) +{ + my ($hash, $doit) = @_; + + if($doit) { + delete($hash->{NOTIFYDEV}); + $hash->{disableNotifyFn} = 1 + } else { + delete($hash->{disableNotifyFn}); + } + %ntfyHash = (); +} + sub setNotifyDev($$) {