mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
98_DOIF.pm: fixed: reset $1,$2, ... vor reading output
git-svn-id: https://svn.fhem.de/fhem/trunk@13965 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
30de824ad9
commit
faf889a044
@ -358,7 +358,6 @@ ReadingSecDoIf($$)
|
||||
sub
|
||||
ReadingValDoIf
|
||||
{
|
||||
|
||||
my ($hash,$name,$reading,$default,$regExp,$output)=@_;
|
||||
|
||||
$default=AttrVal($hash->{NAME},'notexist','') if (!defined $default);
|
||||
@ -369,7 +368,6 @@ ReadingValDoIf
|
||||
} else {
|
||||
$default=EvalValueDoIf($hash,"default",$default);
|
||||
}
|
||||
|
||||
my $r;
|
||||
my $element;
|
||||
return ($default) if (!defined $defs{$name});
|
||||
@ -377,6 +375,7 @@ ReadingValDoIf
|
||||
$r=$defs{$name}{READINGS}{$reading}{VAL};
|
||||
$r="" if (!defined($r));
|
||||
if ($regExp) {
|
||||
"" =~ /()()()()()()()()()/; #reset $1, $2....
|
||||
$element = ($r =~ /$regExp/) ? $1 : "";
|
||||
if ($output) {
|
||||
$element= eval $output;
|
||||
|
Loading…
x
Reference in New Issue
Block a user