2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 01:46:08 +00:00

98_structure.pm: add propagateAttr (Forum #70773)

git-svn-id: https://svn.fhem.de/fhem/trunk@19809 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-07-09 20:56:14 +00:00
parent afd9e4a3f7
commit 1d9028cef9

View File

@ -49,6 +49,7 @@ structure_Initialize($)
disable
disabledForIntervals
evaluateSetResult:1,0
propagateAttr
setStateIndirectly:1,0
setStructType:0,1
);
@ -390,7 +391,8 @@ structure_Set($@)
my %pars;
# see Forum # 28623 for .cachedHelp
return $hash->{".cachedHelp"} if($list[1] eq "?" && $hash->{".cachedHelp"});
return $hash->{".cachedHelp"}
if(@list > 1 && $list[1] eq "?" && $hash->{".cachedHelp"});
my @devList = @{$hash->{".memberList"}};
if(@list > 1 && $list[$#list] eq "reverse") {
@ -525,6 +527,7 @@ structure_Attr($@)
group=>1,
icon=>1,
room=>1,
propagateAttr=>1,
setStateIndirectly=>1,
stateFormat=>1,
webCmd=>1,
@ -535,6 +538,8 @@ structure_Attr($@)
my $me = $list[0];
my $hash = $defs{$me};
my $pa = AttrVal($me, "propagateAttr", $featurelevel <= 5.9 ? '.*' : '^$');
return undef if($list[1] !~ m/$pa/);
if($hash->{INATTR}) {
Log3 $me, 1, "ERROR: endless loop detected in structure_Attr for $me";
@ -734,6 +739,12 @@ structure_Attr($@)
compute the new status.
</li>
<li>propagateAttr &lt;regexp&gt;<br>
if the regexp matches the name of the attribute, then this attribute will
be propagated to all the members. The default is .* (each attribute) for
featurelevel <= 5.9, else ^$ (no attribute).
</li>
<li>setStateIndirectly<br>
If true (1), set the state only when member devices report a state
change, else the state is first set to the set command argument. Default
@ -956,6 +967,13 @@ structure_Attr($@)
neuen Status auswerten soll.
</li>
<li>propagateAttr &lt;regexp&gt;<br>
Falls der Regexp auf den Namen des Attributes zutrifft, dann wird dieses
Attribut an allen Mitglieder weitergegeben. F&uuml;r featurelevel <= 5.9
ist die Voreinstellung .* (d.h. alle Attribute), sonst ^$ (d.h. keine
Attribute).
</li>
<li>setStateIndirectly<br>
Falls wahr (1), dann wird der Status der Struktur nur aus dem
Statusmeldungen der Mitglied-Ger&auml;te bestimmt, sonst wird zuerst der