Fix empty value in settings

This commit is contained in:
Andre Basche 2023-07-19 19:52:21 +02:00
parent bc7e8994c9
commit bf2015fcb9

View File

@ -253,7 +253,9 @@ class HonAppliance:
if not (command := self.commands.get(command_name)):
return
for key in command.setting_keys:
if (new := self.attributes.get("parameters", {}).get(key)) is None:
if (
new := self.attributes.get("parameters", {}).get(key)
) is None or new.value == "":
continue
setting = command.settings[key]
try: