Oven overwrite #12

Merged
MiguelAngelLV merged 8 commits from main into main 2023-04-19 20:18:32 +02:00
3 changed files with 10 additions and 7 deletions
Showing only changes of commit a68dcac379 - Show all commits

View File

@ -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

View File

@ -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)

View File

@ -7,7 +7,7 @@ with open("README.md", "r") as f:
setup(
name="pyhOn",
version="0.8.0b4",
version="0.8.0b5",
author="Andre Basche",
description="Control hOn devices with python",
long_description=long_description,