1
0
mirror of https://github.com/Andre0512/pyhOn.git synced 2024-11-29 08:22:09 +02:00

Handle special dry level 11

This commit is contained in:
Andre Basche 2023-04-22 23:08:24 +02:00
parent b04c601ad6
commit 1dad0e14b8

View File

@ -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