mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +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 setGlobalAttrBeforeFork($);
|
||||
sub setReadingsVal($$$$);
|
||||
sub setAttrList($$);
|
||||
sub setDevAttrList($;$);
|
||||
sub toJSON($);
|
||||
sub utf8ToLatin1($);
|
||||
|
||||
@ -3923,6 +3925,20 @@ addToAttrList($)
|
||||
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
|
||||
attrSplit($)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user