fhem.pl: setreading check for good reading characters (Forum #83840)

git-svn-id: https://svn.fhem.de/fhem/trunk@16087 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2018-02-04 19:52:51 +00:00
parent d3b9d86513
commit 13348e18a2

View File

@@ -2247,6 +2247,8 @@ CommandSetReading($$)
($err, @b) = ReplaceSetMagic($hash, 3, @a);
delete $hash->{CL};
}
return "WARNING: unsupported character in reading $b[1] ".
"(not A-Za-z/\\d_\\.-)" if(!goodReadingName($b[1]));
readingsSingleUpdate($defs{$sdev}, $b[1], $b[2], 1);
}
return join("\n", @rets);
@@ -2760,7 +2762,7 @@ CommandAttr($$)
$arg= defined($8) ? $8 : "";
}
$hash->{'.userReadings'}= \@userReadings;
}
}
my $oVal = ($attr{$sdev} ? $attr{$sdev}{$attrName} : "");