2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

dded Numbers to the stateFormat regexp

git-svn-id: https://svn.fhem.de/fhem/trunk@3506 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-07-26 08:57:39 +00:00
parent e6544f763f
commit 3f9a32a781

View File

@ -3171,7 +3171,7 @@ evalStateFormat($)
# Substitute reading names with their values, leave the rest untouched. # Substitute reading names with their values, leave the rest untouched.
$st = $sr; $st = $sr;
my $r = $hash->{READINGS}; my $r = $hash->{READINGS};
$st =~ s/\b([A-Za-z_\.-]+)\b/($r->{$1} ? $r->{$1}{VAL} : $1)/ge; $st =~ s/\b([A-Za-z\d_\.-]+)\b/($r->{$1} ? $r->{$1}{VAL} : $1)/ge;
} }
$hash->{STATE} = ReplaceEventMap($name, $st, 1) if(defined($st)); $hash->{STATE} = ReplaceEventMap($name, $st, 1) if(defined($st));