From 7b7f134aaa7444fce0eedf66158e3b53e54a9e57 Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Sun, 18 Jul 2021 17:10:18 +0000 Subject: [PATCH] HM_Template: correct register filtering git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24772 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_HMtemplate.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FHEM/98_HMtemplate.pm b/FHEM/98_HMtemplate.pm index 409c25c60..cb6575ed9 100644 --- a/FHEM/98_HMtemplate.pm +++ b/FHEM/98_HMtemplate.pm @@ -620,13 +620,13 @@ sub HMtemplate_noDup(@) {#return list with no duplicates####################### sub HMtemplate_sourceList($){ my $type = shift; my $match; - if ($type =~ m/peer-(Long|Short)/){$match = "RegL_03.*"} - elsif($type =~ m/peer/ ){$match = "RegL_..\..*"} - elsif($type eq "basic" ){$match = "RegL_..\."} - + if ($type =~ m/peer-(Long|Short)/){$match = 'RegL_03.*'} + elsif($type =~ m/peer/ ){$match = 'RegL_..\..+'} + elsif($type eq "basic" ){$match = 'RegL_..\.'} + my @list; - foreach my $e (devspec2array("TYPE=CUL_HM:FILTER=subType!=virtual")){ - my @l1 = grep/$match$/,CUL_HM_reglUsed($e); + foreach my $e (grep{!$defs{$_}{helper}{role}{vrt}} devspec2array("TYPE=CUL_HM")){ + my @l1 = grep {$_ =~ m/$match$/} CUL_HM_reglUsed($e); $_ = $e foreach(@l1); push @list,@l1; }