From bc9ccf0e47e2788e0fabf00937efdb9bbfaa421c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 9 Feb 2022 10:33:06 +0100 Subject: [PATCH] Add device availability to Plugwise (#66152) --- homeassistant/components/plugwise/entity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/plugwise/entity.py b/homeassistant/components/plugwise/entity.py index 5fa28541815..349ee6d05e9 100644 --- a/homeassistant/components/plugwise/entity.py +++ b/homeassistant/components/plugwise/entity.py @@ -48,6 +48,11 @@ class PlugwiseEntity(CoordinatorEntity[PlugwiseData]): } ) + @property + def available(self) -> bool: + """Return if entity is available.""" + return super().available and self._dev_id in self.coordinator.data.devices + async def async_added_to_hass(self) -> None: """Subscribe to updates.""" self._handle_coordinator_update()