mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
90_atp.pm: add $readingFnAttributes (Forum #89791)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@17051 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e9c613ab53
commit
04e0b70ab0
@ -18,7 +18,7 @@ at_Initialize($)
|
|||||||
$hash->{SetFn} = "at_Set";
|
$hash->{SetFn} = "at_Set";
|
||||||
$hash->{AttrFn} = "at_Attr";
|
$hash->{AttrFn} = "at_Attr";
|
||||||
$hash->{StateFn} = "at_State";
|
$hash->{StateFn} = "at_State";
|
||||||
$hash->{AttrList} = "disable:0,1 disabledForIntervals ".
|
$hash->{AttrList} = "disable:0,1 disabledForIntervals $readingFnAttributes ".
|
||||||
"skip_next:0,1 alignTime computeAfterInit";
|
"skip_next:0,1 alignTime computeAfterInit";
|
||||||
$hash->{FW_detailFn} = "at_fhemwebFn";
|
$hash->{FW_detailFn} = "at_fhemwebFn";
|
||||||
}
|
}
|
||||||
@ -294,6 +294,12 @@ at_Attr(@)
|
|||||||
return $ret if($ret);
|
return $ret if($ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($cmd eq "set" && $attrName eq "stateFormat" && !$init_done) {
|
||||||
|
$attr{$name}{stateFormat} = $attrVal;
|
||||||
|
evalStateFormat($hash);
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
if($cmd eq "set" && $attrName eq "disable") {
|
if($cmd eq "set" && $attrName eq "disable") {
|
||||||
$do = (!defined($attrVal) || $attrVal) ? 1 : 2;
|
$do = (!defined($attrVal) || $attrVal) ? 1 : 2;
|
||||||
}
|
}
|
||||||
@ -761,6 +767,7 @@ EOF
|
|||||||
überspringen</li><br>
|
überspringen</li><br>
|
||||||
|
|
||||||
<li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
|
<li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
|
||||||
|
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
4
fhem.pl
4
fhem.pl
@ -3987,8 +3987,8 @@ attrSplit($)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# $dir: 0: User to Device (i.e. set) 1: Device to Usr (i.e trigger)
|
# $dir: 0: User to Device (i.e. set), $str is an array pointer
|
||||||
# $dir: 0: $str is an array pointer 1: $str is a a string
|
# $dir: 1: Device to Usr (i.e trigger), $str is a a string
|
||||||
sub
|
sub
|
||||||
ReplaceEventMap($$$)
|
ReplaceEventMap($$$)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user