mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Plugwise: implement device availability for non-legacy devices (#80191)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
ea6368775b
commit
937aa286b7
@ -65,7 +65,11 @@ class PlugwiseEntity(CoordinatorEntity[PlugwiseDataUpdateCoordinator]):
|
|||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
"""Return if entity is available."""
|
"""Return if entity is available."""
|
||||||
return super().available and self._dev_id in self.coordinator.data.devices
|
return (
|
||||||
|
self._dev_id in self.coordinator.data.devices
|
||||||
|
and ("available" not in self.device or self.device["available"])
|
||||||
|
and super().available
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device(self) -> dict[str, Any]:
|
def device(self) -> dict[str, Any]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user