mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 19:25:12 +02:00
Add device availability to Plugwise (#66152)
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user