Add and improve fridge

This commit is contained in:
Andre Basche
2023-05-28 06:17:43 +02:00
parent eea79e28b9
commit 7c6ac15901
7 changed files with 47 additions and 5 deletions

View File

@ -295,6 +295,15 @@ class HonAppliance:
)
return result.replace(self.mac_address, "xx-xx-xx-xx-xx-xx")
def sync_command(self, main, target=None) -> None:
base: HonCommand = self.commands.get(main)
for command, data in self.commands.items():
if command == main or target and command not in target:
continue
for name, parameter in data.parameters.items():
if base_value := base.parameters.get(name):
parameter.value = base_value.value
class HonApplianceTest(HonAppliance):
def __init__(self, name):