mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 06:17:07 +00: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:
parent
2a9d29c5f5
commit
d5a1587b1c
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user