Add device availability to Plugwise (#66152)
This commit is contained in:
parent
2f08372026
commit
bc9ccf0e47
1 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue