mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Mark Duotecno entities unavailable when tcp goes down (#114325)
When the tcp connection to the duotecno smartbox goes down, mark all entities as unavailable.
This commit is contained in:
@@ -41,6 +41,11 @@ class DuotecnoEntity(Entity):
|
|||||||
"""When a unit has an update."""
|
"""When a unit has an update."""
|
||||||
self.async_write_ha_state()
|
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")
|
_T = TypeVar("_T", bound="DuotecnoEntity")
|
||||||
_P = ParamSpec("_P")
|
_P = ParamSpec("_P")
|
||||||
|
Reference in New Issue
Block a user