From 5b91747ec108dde62bdb6cd1dc7b95735b3f1c19 Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Sun, 16 Apr 2023 02:46:30 +0200 Subject: [PATCH] Add dish washer --- pyhon/appliances/dw.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pyhon/appliances/dw.py diff --git a/pyhon/appliances/dw.py b/pyhon/appliances/dw.py new file mode 100644 index 0000000..62311bd --- /dev/null +++ b/pyhon/appliances/dw.py @@ -0,0 +1,9 @@ +class Appliance: + def data(self, data): + if data["attributes"]["lastConnEvent"]["category"] == "DISCONNECTED": + data["attributes"]["parameters"]["machMode"] = "0" + data["active"] = bool(data.get("attributes", {}).get("activity")) + return data + + def settings(self, settings): + return settings