mirror of
https://github.com/home-assistant/core.git
synced 2025-08-16 19:11:42 +02:00
Plugwise: implement device availability for non-legacy devices (#80191)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
@@ -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]:
|
||||||
|
Reference in New Issue
Block a user