Lock attributes

This commit is contained in:
Andre Basche 2023-06-13 00:39:18 +02:00
parent f6139db0b5
commit 1ca89995a2
2 changed files with 26 additions and 5 deletions

View file

@ -330,7 +330,7 @@ class HonAppliance:
command: HonCommand = self.commands.get(command_name)
for key, value in self.attributes.get("parameters", {}).items():
if isinstance(value, str) and (new := command.parameters.get(key)):
self.attributes["parameters"][key].value = str(new.intern_value)
self.attributes["parameters"][key].update(str(new.intern_value), shield=True)
def sync_command(self, main, target=None) -> None:
base: HonCommand = self.commands.get(main)