Handle special dry level 11

This commit is contained in:
Andre Basche 2023-04-22 23:08:24 +02:00
parent b04c601ad6
commit 1dad0e14b8
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,6 @@
from pyhon.parameter.fixed import HonParameterFixed
class Appliance: class Appliance:
def data(self, data): def data(self, data):
if data["attributes"]["lastConnEvent"]["category"] == "DISCONNECTED": if data["attributes"]["lastConnEvent"]["category"] == "DISCONNECTED":
@ -7,4 +10,7 @@ class Appliance:
return data return data
def settings(self, settings): 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 return settings