mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
fhem.pl: add $DEV to rReplaceSetMagic (Forum #57210)
git-svn-id: https://svn.fhem.de/fhem/trunk@12094 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
13890e361c
commit
e4d3bdd483
@ -1066,14 +1066,16 @@ The following local attributes are used by a wider range of devices:
|
||||
Each device has different set parameters, see the corresponding device
|
||||
section for details.<br>
|
||||
<br><br>
|
||||
From featurelevel 5.7 on the set (and setreading) command replaces:
|
||||
From featurelevel 5.7 on the set and setreading command replaces:
|
||||
<ul>
|
||||
<li>[device:reading] with the corresponding reading of device, if both device
|
||||
and reading exists.</li>
|
||||
<li>[device:reading:d] same as above, but only the number is retrieved, see
|
||||
ReadingsNum </li>
|
||||
<li>{(perlExpression)} with the result of perlExpression, if the expression
|
||||
does not generates an error.</li>
|
||||
<li>{(perlExpression)} with the result of perlExpression.
|
||||
If this construct is used inside of a notify or cmdalias, the $DEV variable
|
||||
is additionally available, designating the set device name.
|
||||
</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
|
||||
|
@ -1134,8 +1134,11 @@ Die folgenden lokalen Attribute werden von mehreren Geräten verwendet:
|
||||
device, als auch Reading existiert, und nicht leer ist.</li>
|
||||
<li>[device:reading:d] wie ohne :d, aber alles nicht-numerische wird
|
||||
entfernt, siehe ReadingsNum</li>
|
||||
<li>{(perlExpression)} mit dem Ergebnis der perlExpression, falls der Ausdruck
|
||||
keinen Fehler generiert.</li>
|
||||
<li>{(perlExpression)} mit dem Ergebnis der perlExpression.
|
||||
Falls dieser Konstrukt innerhalb einer notify oder cmdalias verwendet wird,
|
||||
dann wird zusätzlich $DEV mit dem Namen des vom set betroffenen
|
||||
Gerätes ersetzt.
|
||||
</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
|
||||
|
@ -1566,6 +1566,7 @@ ReplaceSetMagic($$@) # Forum #38276
|
||||
$x eq "" ? "[$1:$2$3]" : $x
|
||||
}/egi;
|
||||
|
||||
$evalSpecials->{'%DEV'} = $hash->{NAME} if($evalSpecials);
|
||||
$a =~ s/{\((.*?)\)}/AnalyzePerlCommand($hash->{CL},$1,1)/egs;
|
||||
|
||||
return (undef, @_) if($oa eq $a);
|
||||
|
Loading…
Reference in New Issue
Block a user