From 68eefc7026c0de1fe367bbfab05d485b628bf430 Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Sat, 24 Dec 2022 08:27:11 +0000 Subject: [PATCH] 98_monitoring: white- and blacklist hebaviour changed to more accuracy; forum #126515 git-svn-id: https://svn.fhem.de/fhem/trunk@26892 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/98_monitoring.pm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 24797307c..3ee149606 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # 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. + - change: 98_monitoring: white- and blacklist now are more accurate - bugfix: 70_SVDRP: claen timer name, fix stateFormat overwrite - feature: 93_DbRep: sqlCmd supports execute DB Procedures - bugfix: 47_OBIS: Support DZG hack for power_L1/2/3 diff --git a/fhem/FHEM/98_monitoring.pm b/fhem/FHEM/98_monitoring.pm index a4d04fa31..26569fce5 100644 --- a/fhem/FHEM/98_monitoring.pm +++ b/fhem/FHEM/98_monitoring.pm @@ -322,14 +322,14 @@ sub Notify { push @blacklist, devspec2array($_) for (split m{[\s]+}x, AttrVal($SELF, 'blacklist', '')); - return if @blacklist && grep { m{$name}x } @blacklist; + return if @blacklist && grep { m{\A${name}\z}x } @blacklist; my @whitelist; push @whitelist, devspec2array($_) for (split m{[\s]+}x, AttrVal($SELF, 'whitelist', '')); - return if @whitelist && !grep { m{$name}x } @whitelist; + return if @whitelist && !grep { m{\A$name\z}x } @whitelist; for my $event (@{$events}){ next if !$event;