From 1dad0e14b81264fc6f2eb4724f8ca26306dfb22d Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Sat, 22 Apr 2023 23:08:24 +0200 Subject: [PATCH] Handle special dry level 11 --- pyhon/appliances/td.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyhon/appliances/td.py b/pyhon/appliances/td.py index 8aac4fd..42e4ecb 100644 --- a/pyhon/appliances/td.py +++ b/pyhon/appliances/td.py @@ -1,3 +1,6 @@ +from pyhon.parameter.fixed import HonParameterFixed + + class Appliance: def data(self, data): if data["attributes"]["lastConnEvent"]["category"] == "DISCONNECTED": @@ -7,4 +10,7 @@ class Appliance: return data def settings(self, settings): + dry_level = settings["startProgram.dryLevel"] + if isinstance(dry_level, HonParameterFixed) and dry_level.value == "11": + settings.pop("startProgram.dryLevel", None) return settings