From aa563dfd45269354fd90160b4f1c75f796c222a5 Mon Sep 17 00:00:00 2001 From: Tomer <57483589+tomer-w@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:14:57 +0200 Subject: [PATCH] Fix regressions in cover (#327) --- custom_components/rpi_gpio/hub.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/rpi_gpio/hub.py b/custom_components/rpi_gpio/hub.py index 364dd51..a74a7f5 100644 --- a/custom_components/rpi_gpio/hub.py +++ b/custom_components/rpi_gpio/hub.py @@ -199,7 +199,8 @@ class Hub: bias = BIAS[bias], active_low = active_low)}, ) as request: - entity._attr_is_on = True if request.get_value(port) == Value.ACTIVE else False + # Although we prefer to set the _attr_is_on attribute, in cover it does not exists for whatever reason. + entity.is_on = True if request.get_value(port) == Value.ACTIVE else False _LOGGER.debug(f"current value for port {port}: {entity.is_on}") self._edge_events = True