Expose settings
This commit is contained in:
@ -135,11 +135,18 @@ class HonDevice:
|
||||
elif "parameters" in attr[list(attr)[0]]:
|
||||
multi = {}
|
||||
for category, attr2 in attr.items():
|
||||
cmd = HonCommand(command, attr2, self._connector, self, multi=multi)
|
||||
cmd = HonCommand(command, attr2, self._connector, self, multi=multi, category=category)
|
||||
multi[category] = cmd
|
||||
commands[command] = cmd
|
||||
self._commands = commands
|
||||
|
||||
@property
|
||||
def settings(self):
|
||||
result = {}
|
||||
for command in self._commands.values():
|
||||
result |= command.settings
|
||||
return result
|
||||
|
||||
async def load_attributes(self):
|
||||
data = await self._connector.load_attributes(self)
|
||||
for name, values in data.get("shadow").get("parameters").items():
|
||||
|
||||
Reference in New Issue
Block a user