2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

AttrTemplate: add verbose 5 debug lines (Forum #112955)

git-svn-id: https://svn.fhem.de/fhem/trunk@22985 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-10-18 09:04:19 +00:00
parent 88116aac24
commit 6fe189f026

View File

@ -334,6 +334,8 @@ AttrTemplate_Set($$@)
my $cmdlist = join("\n",@{$h->{cmds}});
$repl{DEVICE} = $name;
Log3 $name, 5, "AttrTemplate replace ".
join(",", map { "$_=>$repl{$_}" } sort keys %repl);
map { $cmdlist =~ s/(?<!\\)$_/$repl{$_}/g; } sort keys %repl;
map { $cmdlist =~ s/\\$_/$_/g; } sort keys %repl;
my $cl = $hash->{CL};
@ -359,9 +361,13 @@ AttrTemplate_Set($$@)
} elsif($option) {
$cmd =~ s/##.*//; #114109
Log3 $name, 5, "AttrTemplate exec $cmd";
my $r = AnalyzeCommand($cl, $cmd);
push(@ret, $r) if($r);
} else {
Log3 $name, 5, "AttrTemplate skip $cmd";
}
$cmd = "";
}