From 6e12e49a538d26324bbec0f11d737834b53a0dfa Mon Sep 17 00:00:00 2001 From: Vadim Grinco Date: Tue, 23 Mar 2021 10:05:17 +0100 Subject: [PATCH] Added support for DISABLED status Signed-off-by: Vadim Grinco --- custom_components/garo_wallbox/garo.py | 1 + custom_components/garo_wallbox/sensor.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/custom_components/garo_wallbox/garo.py b/custom_components/garo_wallbox/garo.py index e294e3f..444d8f4 100644 --- a/custom_components/garo_wallbox/garo.py +++ b/custom_components/garo_wallbox/garo.py @@ -34,6 +34,7 @@ class Status(Enum): CHARGING_PAUSED = 'CHARGING_PAUSED' CHARGING_FINISHED = 'CHARGING_FINISHED' CHARGING_CANCELLED = 'CHARGING_CANCELLED' + DISABLED = 'DISABLED' OVERHEAT = 'OVERHEAT' CRITICAL_TEMPERATURE = 'CRITICAL_TEMPERATURE' INITIALIZATION = 'INITIALIZATION' diff --git a/custom_components/garo_wallbox/sensor.py b/custom_components/garo_wallbox/sensor.py index bbd8c3e..cdf590b 100644 --- a/custom_components/garo_wallbox/sensor.py +++ b/custom_components/garo_wallbox/sensor.py @@ -151,6 +151,7 @@ def icon(self): Status.CHARGING_PAUSED: "mdi:pause", Status.CONNECTED: "mdi:power-plug", Status.CONTACTOR_FAULT: "mdi:alert", + Status.DISABLED: "mdi:stop-circle-outline", Status.CRITICAL_TEMPERATURE: "mdi:alert", Status.DC_ERROR: "mdi:alert", Status.INITIALIZATION: "mdi:timer-sand", @@ -200,6 +201,7 @@ def status_as_str(self): Status.CHARGING_CANCELLED: "Charging cancelled", Status.CHARGING_FINISHED: "Charging finished", Status.CHARGING_PAUSED: "Charging paused", + Status.DISABLED: "Charging disabled", Status.CONNECTED: "Vehicle connected", Status.CONTACTOR_FAULT: "Contactor fault", Status.CRITICAL_TEMPERATURE: "Overtemperature, charging cancelled",