76_msgDialog: fix userattr for msgConfig device

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@15575 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
igami 2017-12-09 08:08:00 +00:00
parent 68b2d50883
commit 4dce1e0b73
2 changed files with 23 additions and 15 deletions

View File

@ -543,7 +543,8 @@ sub archetype_attrCheck($$$$;$) {
return $ret; return $ret;
} }
CommandAttr(undef, "$name $attribute $desired"); fhem("attr $name $attribute $desired");
# CommandAttr(undef, "$name $attribute $desired");
} }
return; return;
@ -676,20 +677,26 @@ sub archetype_devspec($;$) {
no warnings; no warnings;
$devspecs .= " a:actual_$attribute=.+"; $devspecs .= " a:actual_$attribute=.+";
my $actual_attribute = AttrVal($SELF, "actual_$attribute", "");
my $mandatory = join(" ", archetype_evalSpecials( if($actual_attribute =~ m/^\{.*\}$/){
$SELF, AttrVal($SELF, "actual_$attribute", ""), "mandatory"
));
while($mandatory =~ m/[^\|]\|[^\|]/){
my @parts = split("\\|\\|", $mandatory);;
$_ =~ s/(.* )?(\S+)\|(\S+)( .*)?/$1$2$4\|\|$1$3$4/ for(@parts);;
$mandatory = join("\|\|", @parts);;
}
for my $mandatory (split("\\|\\|", $mandatory)){
$devspecs .= " .+"; $devspecs .= " .+";
$devspecs .= ":FILTER=a:$_=.+" for(split(" ", $mandatory)); }
else{
my $mandatory = join(" ", archetype_evalSpecials(
$SELF, $actual_attribute, "mandatory"
));
while($mandatory =~ m/[^\|]\|[^\|]/){
my @parts = split("\\|\\|", $mandatory);;
$_ =~ s/(.* )?(\S+)\|(\S+)( .*)?/$1$2$4\|\|$1$3$4/ for(@parts);;
$mandatory = join("\|\|", @parts);;
}
for my $mandatory (split("\\|\\|", $mandatory)){
$devspecs .= " .+";
$devspecs .= ":FILTER=a:$_=.+" for(split(" ", $mandatory));
}
} }
} }
} }

View File

@ -398,6 +398,7 @@ sub monitoring_Notify($$) {
} }
# module Fn ################################################################### # module Fn ###################################################################
# stateFormat #################################################################
sub monitoring_modify($) { sub monitoring_modify($) {
my ($SELF, $list, $operation, $value, $wait) = split("\\|", shift); my ($SELF, $list, $operation, $value, $wait) = split("\\|", shift);
my ($hash) = $defs{$SELF}; my ($hash) = $defs{$SELF};
@ -565,7 +566,7 @@ sub monitoring_setActive($) {
<b>Define</b> <b>Define</b>
<ul> <ul>
<code> <code>
define &lt;name&gt; &lt;add-event&gt; [&lt;remove-event&gt;] define &lt;name&gt; monitoring &lt;add-event&gt; [&lt;remove-event&gt;]
</code> </code>
<br> <br>
The syntax for &lt;add-event&gt; and &lt;remove-event&gt; is the The syntax for &lt;add-event&gt; and &lt;remove-event&gt; is the
@ -1026,7 +1027,7 @@ attr BeamerFilter_monitoring warningFuncRemove {return}</pre>
<b>Define</b> <b>Define</b>
<ul> <ul>
<code> <code>
define &lt;name&gt; &lt;add-event&gt; [&lt;remove-event&gt;] define &lt;name&gt; mointoring &lt;add-event&gt; [&lt;remove-event&gt;]
</code> </code>
<br> <br>
Die Syntax f&uuml;r &lt;add-event&gt; und &lt;remove-event&gt; ist die Die Syntax f&uuml;r &lt;add-event&gt; und &lt;remove-event&gt; ist die