From 8352ee1c10a4644a4aa6e836b0398c2d6c50352c Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 26 Oct 2020 18:39:12 +0000 Subject: [PATCH] fhem.pl: fix userreadings if the event is 0 (Forum #115273) git-svn-id: https://svn.fhem.de/fhem/trunk@23031 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 9914a7e13..57ffc489b 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -4733,9 +4733,10 @@ readingsEndUpdate($$) my $reading= $userReading->{reading}; my ($event, $eventName, $eventValue, $ownRead); if(defined($trigger)) { - map { $event = $_ if($_ && $_ =~ m/^$trigger$/); - $ownRead = 1 if($_ && $_ =~ m/^$reading:/); } @{$hash->{CHANGED}}; - next if(!$event || $ownRead); + map { $event = $_ if(defined($_) && $_ =~ m/^$trigger$/); + $ownRead = 1 if(defined($_) && $_ =~ m/^$reading:/); } + @{$hash->{CHANGED}}; + next if(!defined($event) || $ownRead); ($eventName, $eventValue) = ($1, $2) if($event =~ m/^([^:]*): (.*)$/); }