2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-25 15:59:21 +00:00

fhem.pl: fix setreading fir multiple devices (Forum #66087)

git-svn-id: https://svn.fhem.de/fhem/trunk@13288 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-01-30 19:47:33 +00:00
parent 6fb7eb7a72
commit a0a1990dee

View File

@ -2125,7 +2125,7 @@ CommandSetReading($$)
return "Usage: setreading <name> <reading> <value>\n$namedef" if(@a != 3);
my $err;
my @b = @a;
my @rets;
foreach my $sdev (devspec2array($a[0],$cl)) {
@ -2136,10 +2136,10 @@ CommandSetReading($$)
my $hash = $defs{$sdev};
if($featurelevel >= 5.7) {
$hash->{CL} = $cl;
($err, @a) = ReplaceSetMagic($hash, 3, @a);
($err, @b) = ReplaceSetMagic($hash, 3, @a);
delete($hash->{CL});
}
readingsSingleUpdate($defs{$sdev}, $a[1], $a[2], 1);
readingsSingleUpdate($defs{$sdev}, $b[1], $b[2], 1);
}
return join("\n", @rets);
}