From c439f0e78b7320b189ac0e901fc5660c359304e2 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 12 Nov 2015 08:50:18 +0000 Subject: [PATCH] fhem.pl: ReplaceSetMagic syntax changed. (Forum #38276 and #43926) git-svn-id: https://svn.fhem.de/fhem/trunk@9866 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/docs/commandref_frame.html | 2 +- fhem/docs/commandref_frame_DE.html | 2 +- fhem/fhem.pl | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/docs/commandref_frame.html b/fhem/docs/commandref_frame.html index c36d4672f..04bd6a1c6 100644 --- a/fhem/docs/commandref_frame.html +++ b/fhem/docs/commandref_frame.html @@ -1120,7 +1120,7 @@ The following local attributes are used by a wider range of devices:

diff --git a/fhem/docs/commandref_frame_DE.html b/fhem/docs/commandref_frame_DE.html index 0ac5b785f..0439506bf 100644 --- a/fhem/docs/commandref_frame_DE.html +++ b/fhem/docs/commandref_frame_DE.html @@ -1183,7 +1183,7 @@ Die folgenden lokalen Attribute werden von mehreren Geräten verwendet:

diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 50705d4be..db237b1d7 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -1511,10 +1511,10 @@ ReplaceSetMagic(@) # Forum #38276 my $x = ReadingsVal($1,$2,""); $x eq "" ? "[$1:$2]" : $x }/egi; - $a =~ s/({[^}]+})/{ + $a =~ s/{\((.*)\)}/{ my $x = eval $1; Log 1, "ReplaceSetMagic: $1 -> $@" if($@); - ($@ || ref($x) eq "HASH") ? $1 : $x + $@ ? $1 : $x }/eg; return split(" ", $a);