From d5a1587b1c76e7432df1c69be2bedb32e072fb1a Mon Sep 17 00:00:00 2001 From: Maikel Punie <maikel.punie@gmail.com> Date: Wed, 15 May 2024 15:12:47 +0200 Subject: [PATCH] Mark Duotecno entities unavailable when tcp goes down (#114325) When the tcp connection to the duotecno smartbox goes down, mark all entities as unavailable. --- homeassistant/components/duotecno/entity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/duotecno/entity.py b/homeassistant/components/duotecno/entity.py index 86f61c8a73c..7661080f231 100644 --- a/homeassistant/components/duotecno/entity.py +++ b/homeassistant/components/duotecno/entity.py @@ -41,6 +41,11 @@ class DuotecnoEntity(Entity): """When a unit has an update.""" self.async_write_ha_state() + @property + def available(self) -> bool: + """Available state for the unit.""" + return self._unit.is_available() + _T = TypeVar("_T", bound="DuotecnoEntity") _P = ParamSpec("_P") -- GitLab