mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
98_structure.pm: behave correctly when the structure definition order is strange (Forum #32493)
git-svn-id: https://svn.fhem.de/fhem/trunk@7652 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
fcef72d497
commit
641af10299
@ -66,7 +66,7 @@ structAdd($$)
|
||||
|
||||
} else {
|
||||
addToDevAttrList($c, $attrList);
|
||||
structAdd($c, $attrList) if($defs{$d}{TYPE} eq "structure");
|
||||
structAdd($c, $attrList) if($defs{$d} && $defs{$d}{TYPE} eq "structure");
|
||||
}
|
||||
}
|
||||
delete $defs{$d}{INstructAdd};
|
||||
@ -89,12 +89,14 @@ structure_Define($$)
|
||||
$hash->{ATTR} = $stype;
|
||||
|
||||
my %list;
|
||||
my $attrList = "$stype ${stype}_map structexclude";
|
||||
my $aList = "$stype ${stype}_map structexclude";
|
||||
foreach my $a (@a) {
|
||||
foreach my $d (devspec2array($a)) {
|
||||
$list{$d} = 1;
|
||||
addToDevAttrList($d, $attrList);
|
||||
structAdd($d, $attrList) if($defs{$d}{TYPE} eq "structure");
|
||||
if($init_done) {
|
||||
addToDevAttrList($d, $aList);
|
||||
structAdd($d, $aList) if($defs{$d} && $defs{$d}{TYPE} eq "structure");
|
||||
}
|
||||
}
|
||||
}
|
||||
$hash->{CONTENT} = \%list;
|
||||
|
Loading…
x
Reference in New Issue
Block a user