mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-03 19:49:02 +00:00
fhem.pl: Implement [name:reading:d] in ReplaceSetMagic (Forum #52092)
git-svn-id: https://svn.fhem.de/fhem/trunk@11235 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5847fba36e
commit
b4046e00d4
@ -1543,8 +1543,9 @@ ReplaceSetMagic($$@) # Forum #38276
|
||||
my $a = join(" ", @_);
|
||||
my $oa = $a;
|
||||
|
||||
$a =~ s/\[([a-z0-9._]+):([A-z0-9._]+)\]/{
|
||||
my $x = ReadingsVal($1,$2,""); $x eq "" ? "[$1:$2]" : $x
|
||||
$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;
|
||||
|
||||
$a =~ s/{\((.*)\)}/AnalyzePerlCommand($hash->{CL},$1,1)/eg;
|
||||
|
Loading…
x
Reference in New Issue
Block a user