mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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:
parent
afd9e4a3f7
commit
1d9028cef9
@ -49,6 +49,7 @@ structure_Initialize($)
|
|||||||
disable
|
disable
|
||||||
disabledForIntervals
|
disabledForIntervals
|
||||||
evaluateSetResult:1,0
|
evaluateSetResult:1,0
|
||||||
|
propagateAttr
|
||||||
setStateIndirectly:1,0
|
setStateIndirectly:1,0
|
||||||
setStructType:0,1
|
setStructType:0,1
|
||||||
);
|
);
|
||||||
@ -390,7 +391,8 @@ structure_Set($@)
|
|||||||
my %pars;
|
my %pars;
|
||||||
|
|
||||||
# see Forum # 28623 for .cachedHelp
|
# 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"}};
|
my @devList = @{$hash->{".memberList"}};
|
||||||
if(@list > 1 && $list[$#list] eq "reverse") {
|
if(@list > 1 && $list[$#list] eq "reverse") {
|
||||||
@ -525,6 +527,7 @@ structure_Attr($@)
|
|||||||
group=>1,
|
group=>1,
|
||||||
icon=>1,
|
icon=>1,
|
||||||
room=>1,
|
room=>1,
|
||||||
|
propagateAttr=>1,
|
||||||
setStateIndirectly=>1,
|
setStateIndirectly=>1,
|
||||||
stateFormat=>1,
|
stateFormat=>1,
|
||||||
webCmd=>1,
|
webCmd=>1,
|
||||||
@ -535,6 +538,8 @@ structure_Attr($@)
|
|||||||
|
|
||||||
my $me = $list[0];
|
my $me = $list[0];
|
||||||
my $hash = $defs{$me};
|
my $hash = $defs{$me};
|
||||||
|
my $pa = AttrVal($me, "propagateAttr", $featurelevel <= 5.9 ? '.*' : '^$');
|
||||||
|
return undef if($list[1] !~ m/$pa/);
|
||||||
|
|
||||||
if($hash->{INATTR}) {
|
if($hash->{INATTR}) {
|
||||||
Log3 $me, 1, "ERROR: endless loop detected in structure_Attr for $me";
|
Log3 $me, 1, "ERROR: endless loop detected in structure_Attr for $me";
|
||||||
@ -734,6 +739,12 @@ structure_Attr($@)
|
|||||||
compute the new status.
|
compute the new status.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>propagateAttr <regexp><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>
|
<li>setStateIndirectly<br>
|
||||||
If true (1), set the state only when member devices report a state
|
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
|
change, else the state is first set to the set command argument. Default
|
||||||
@ -956,6 +967,13 @@ structure_Attr($@)
|
|||||||
neuen Status auswerten soll.
|
neuen Status auswerten soll.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>propagateAttr <regexp><br>
|
||||||
|
Falls der Regexp auf den Namen des Attributes zutrifft, dann wird dieses
|
||||||
|
Attribut an allen Mitglieder weitergegeben. Für featurelevel <= 5.9
|
||||||
|
ist die Voreinstellung .* (d.h. alle Attribute), sonst ^$ (d.h. keine
|
||||||
|
Attribute).
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>setStateIndirectly<br>
|
<li>setStateIndirectly<br>
|
||||||
Falls wahr (1), dann wird der Status der Struktur nur aus dem
|
Falls wahr (1), dann wird der Status der Struktur nur aus dem
|
||||||
Statusmeldungen der Mitglied-Geräte bestimmt, sonst wird zuerst der
|
Statusmeldungen der Mitglied-Geräte bestimmt, sonst wird zuerst der
|
||||||
|
Loading…
x
Reference in New Issue
Block a user