Skip to content

Commit

Permalink
Handle special dry level 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed Apr 22, 2023
1 parent b04c601 commit 1dad0e1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyhon/appliances/td.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from pyhon.parameter.fixed import HonParameterFixed


class Appliance:
def data(self, data):
if data["attributes"]["lastConnEvent"]["category"] == "DISCONNECTED":
Expand All @@ -7,4 +10,7 @@ def data(self, data):
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

0 comments on commit 1dad0e1

Please sign in to comment.