From 56041143c181e655525f794866755b158d57e710 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 19 Apr 2020 15:15:46 +0000 Subject: [PATCH] fhem.pl: allow setreading from userReadings (Forum #110375) git-svn-id: https://svn.fhem.de/fhem/trunk@21720 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index fe0ca6ece..ad49cc22d 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -2416,7 +2416,12 @@ CommandSetReading($$) my $b1 = $b[1]; return "$sdev: bad reading name '$b1' (allowed chars: A-Za-z/\\d_\\.-)" if(!goodReadingName($b1)); - readingsSingleUpdate($defs{$sdev}, $b1, $b[2], 1); + + if($hash->{".updateTime"}) { # Called from userReadings, #110375 + setReadingsVal($hash, $b1, $b[2], TimeNow()); + } else { + readingsSingleUpdate($hash, $b1, $b[2], 1); + } } return join("\n", @rets); }