2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 00:36:25 +00:00

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
This commit is contained in:
rudolfkoenig 2020-10-26 18:39:12 +00:00
parent 799870743c
commit 8352ee1c10

View File

@ -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/^([^:]*): (.*)$/);
}