From fa5e546a2aa7bd74228c2b8cbf4eb53b2b7b09a2 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Sun, 28 Jun 2020 12:12:52 +0000 Subject: [PATCH] AttrTemplate.pm: show the content of recursive attrTemplates (Forum #112383) git-svn-id: https://svn.fhem.de/fhem/trunk@22294 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/AttrTemplate.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fhem/FHEM/AttrTemplate.pm b/fhem/FHEM/AttrTemplate.pm index 30f13f651..d07e2b432 100644 --- a/fhem/FHEM/AttrTemplate.pm +++ b/fhem/FHEM/AttrTemplate.pm @@ -156,6 +156,14 @@ AttrTemplate_Help($) my $ret = ""; $ret = $templates{$n}{desc} if($templates{$n}{desc}); $ret .= "
".join("\n",@{$templates{$n}{cmds}})."
"; + + if(AttrVal("global", "showInternalValues", undef)) { + my @atList = grep /set\s.*\sattrTemplate\s/,@{$templates{$n}{cmds}}; + foreach my $at (@atList) { + next if($at !~ m/set\s.*\sattrTemplate\s(.*?) /); + $ret .= "
attrTemplate $1:
".AttrTemplate_Help($1); + } + } return $ret; }