2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

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
This commit is contained in:
rudolfkoenig 2021-10-29 15:21:42 +00:00
parent bd688682ab
commit e8325b7524

View File

@ -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 {