Skip to content

Commit

Permalink
Mark Duotecno entities unavailable when tcp goes down (home-assistant…
Browse files Browse the repository at this point in the history
…#114325)

When the tcp connection to the duotecno smartbox goes down, mark all entities as unavailable.
  • Loading branch information
cereal2nd authored May 15, 2024
1 parent 2a9d29c commit d5a1587
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions homeassistant/components/duotecno/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ async def _on_update(self) -> None:
"""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")
Expand Down

0 comments on commit d5a1587

Please sign in to comment.