2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 10:46:53 +00:00

fhem.pl devspec2array bugfix

git-svn-id: https://svn.fhem.de/fhem/trunk@4351 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-12-09 21:17:25 +00:00
parent 5280a37858
commit bb4888405a

View File

@ -875,8 +875,8 @@ devspec2array($)
foreach my $l (split(",", $name)) { # List of elements
my @names = sort keys %defs;
my @res;
foreach my $dName (split(":FILTER=", $name)) {
my ($n,$op,$re) = ("DEVICE","=",$dName);
foreach my $dName (split(":FILTER=", $l)) {
my ($n,$op,$re) = ("NAME","=",$dName);
if($dName =~ m/^([^!]*)(=|!=)(.*)$/) {
($n,$op,$re) = ($1,$2,$3);
$isAttr = 1; # Compatibility: return "" instead of $name
@ -888,7 +888,7 @@ devspec2array($)
next if($attr{$d} && $attr{$d}{ignore});
if($op eq "eval") {
my $exec = EvalSpecials($n, %{{"%NAME"=>$d}});
my $exec = EvalSpecials($n, %{{"%DEVICE"=>$d}});
push @res, $d if(AnalyzePerlCommand(undef, $exec));
next;
}