diff --git a/fhem/fhem.pl b/fhem/fhem.pl index c063894c9..94e832c0b 100755 --- a/fhem/fhem.pl +++ b/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($) {