From 18b0ecdd68ac8cd4cc8bae248883487ccb47d96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Sat, 8 Apr 2023 22:24:14 +0200 Subject: [PATCH] Override Oven attributes when is disconnected --- pyhon/appliances/ov.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyhon/appliances/ov.py b/pyhon/appliances/ov.py index 0d3fe18..96962cf 100644 --- a/pyhon/appliances/ov.py +++ b/pyhon/appliances/ov.py @@ -8,6 +8,12 @@ class Appliance: self._program_filter = HonParameterEnum("program_filter", data) def data(self, data): + if data["attributes"]["lastConnEvent"]["category"] == "DISCONNECTED": + data["attributes"]["activity"]["attributes"]["temp"] = "0" + data["attributes"]["activity"]["attributes"]["onOffStatus"] = "0" + data["attributes"]["activity"]["attributes"]["remoteCtrValid"] = "0" + data["attributes"]["activity"]["attributes"]["remainingTimeMM"] = "0" + return data def settings(self, settings):