From e8325b75249c870154ef3800ce79b98fb527be0c Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 29 Oct 2021 15:21:42 +0000 Subject: [PATCH] 98_fhemdebug.pm: add Attribute Check to forceEvents (Forum #123655) git-svn-id: https://svn.fhem.de/fhem/trunk@25148 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_fhemdebug.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/98_fhemdebug.pm b/fhem/FHEM/98_fhemdebug.pm index 115b72320..21d7df2b2 100644 --- a/fhem/FHEM/98_fhemdebug.pm +++ b/fhem/FHEM/98_fhemdebug.pm @@ -54,11 +54,13 @@ fhemdebug_Fn($$) $main_readingsEndUpdate = \&readingsEndUpdate; $main_setReadingsVal = \&setReadingsVal; *readingsEndUpdate = sub($$){ - $_[1]=1; + $_[1]=1 if(AttrVal($_[0]->{NAME}, "forceEvents", 0)); &{$main_readingsEndUpdate}(@_); }; *setReadingsVal = sub($$$$) { - DoTrigger($_[0]->{NAME}, "$_[1] $_[2]") if($_[1] && $_[1] eq "IODev"); + DoTrigger($_[0]->{NAME}, "$_[1] $_[2]") + if($_[1] && $_[1] eq "IODev" && + AttrVal($_[0]->{NAME}, "forceEvents", 0)); &{$main_setReadingsVal}(@_); }; } else {