mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
fhem.pl: document [device:reading:d] (Forum #52092)
git-svn-id: https://svn.fhem.de/fhem/trunk@11236 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b4046e00d4
commit
9a3cc56453
@ -1103,6 +1103,8 @@ The following local attributes are used by a wider range of devices:
|
||||
<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>
|
||||
</ul>
|
||||
|
@ -1113,6 +1113,8 @@ Die folgenden lokalen Attribute werden von mehreren Geräten verwendet:
|
||||
<ul>
|
||||
<li>[device:reading] mit dem Wert des Readings für device, falls sowohl
|
||||
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>
|
||||
</ul>
|
||||
|
@ -1543,7 +1543,7 @@ ReplaceSetMagic($$@) # Forum #38276
|
||||
my $a = join(" ", @_);
|
||||
my $oa = $a;
|
||||
|
||||
$a =~ s/\[([a-z0-9._]+):([A-z0-9._]+)(:d)?\]/{
|
||||
$a =~ s/\[([a-z0-9._]+):([a-z0-9._-]+)(:d)?\]/{
|
||||
my $x = $3 ? ReadingsNum($1,$2,"") : ReadingsVal($1,$2,"");
|
||||
$x eq "" ? "[$1:$2$3]" : $x
|
||||
}/egi;
|
||||
|
Loading…
Reference in New Issue
Block a user