mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-11-24 06:40:12 +01:00
Merge remote-tracking branch 'origin/main'
# Conflicts: # pyhon/appliance.py
This commit is contained in:
commit
a68dcac379
@ -175,7 +175,9 @@ class HonAppliance:
|
||||
def parameters(self):
|
||||
result = {}
|
||||
for name, command in self._commands.items():
|
||||
for key, parameter in (command.parameters | command.ancillary_parameters).items():
|
||||
for key, parameter in (
|
||||
command.parameters | command.ancillary_parameters
|
||||
).items():
|
||||
result.setdefault(name, {})[key] = parameter.value
|
||||
return result
|
||||
|
||||
|
@ -61,7 +61,8 @@ class Hon:
|
||||
async def setup(self) -> None:
|
||||
appliance: Dict
|
||||
for appliance in (await self.api.load_appliances())["payload"]["appliances"]:
|
||||
for zone in range(int(appliance.get("zone", "0"))):
|
||||
if (zones := int(appliance.get("zone", "0"))) > 1:
|
||||
for zone in range(zones):
|
||||
await self._create_appliance(appliance.copy(), zone=zone + 1)
|
||||
await self._create_appliance(appliance)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user