mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
fhem.pl: add setDevAttrList (Forum #85868)
git-svn-id: https://svn.fhem.de/fhem/trunk@16453 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
850ed42d0d
commit
662caf55dd
16
fhem/fhem.pl
16
fhem/fhem.pl
@ -149,6 +149,8 @@ sub restoreDir_saveFile($$);
|
|||||||
sub restoreDir_mkDir($$$);
|
sub restoreDir_mkDir($$$);
|
||||||
sub setGlobalAttrBeforeFork($);
|
sub setGlobalAttrBeforeFork($);
|
||||||
sub setReadingsVal($$$$);
|
sub setReadingsVal($$$$);
|
||||||
|
sub setAttrList($$);
|
||||||
|
sub setDevAttrList($;$);
|
||||||
sub toJSON($);
|
sub toJSON($);
|
||||||
sub utf8ToLatin1($);
|
sub utf8ToLatin1($);
|
||||||
|
|
||||||
@ -3923,6 +3925,20 @@ addToAttrList($)
|
|||||||
addToDevAttrList("global", shift);
|
addToDevAttrList("global", shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# device specific attrList, overwrites module AttrList, user undef for $argList
|
||||||
|
# to delete it
|
||||||
|
sub
|
||||||
|
setDevAttrList($;$)
|
||||||
|
{
|
||||||
|
my ($dev,$argList) = @_;
|
||||||
|
return if(!$defs{$dev});
|
||||||
|
if(defined($argList)) {
|
||||||
|
$defs{$dev}{".AttrList"} = $argList;
|
||||||
|
} else {
|
||||||
|
delete($defs{$dev}{".AttrList"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
attrSplit($)
|
attrSplit($)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user