91_notify.pm: avoid trigger in modify, if the regexp matches the own name (Forum #34516)

git-svn-id: https://svn.fhem.de/fhem/trunk@8131 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-03-02 07:32:16 +00:00
parent 4199385c12
commit c8ad01fcec

View File

@ -43,7 +43,9 @@ notify_Define($$)
return "Bad regexp: $@" if($@);
$hash->{REGEXP} = $re;
$hash->{".COMMAND"} = $command;
readingsSingleUpdate($hash, "state", "active", 1);
my $doTrigger = ($name !~ m/^$re$/); # Forum #34516
readingsSingleUpdate($hash, "state", "active", $doTrigger);
notifyRegexpChanged($hash, $re);
return undef;