2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

98_HTTPMOD: bugfix for replacements

git-svn-id: https://svn.fhem.de/fhem/trunk@27050 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
StefanStrobel 2023-01-14 11:32:01 +00:00
parent ec4dc198b7
commit 4f905456f0

View File

@ -511,8 +511,8 @@ sub AttrFn {
}
}
elsif ($aName =~ /((get|set)[0-9]*)?[Rr]eplacement([0-9]*)Value/) {
Log3 $name, 5, "$name: validating attr $name $aName $aVal";
if (AttrVal($name, "replacement${2}Mode", "text") eq "expression") {
Log3 $name, 5, "$name: validating attr $name $aName $aVal, check for replacement${2}Mode";
if (AttrVal($name, "replacement${3}Mode", "text") eq "expression") {
return "Invalid Expression $aVal" if (!EvalExpr($hash,
{expr => $aVal, action => "attr $aName", checkOnly => 1}));
}