Report unavailability for yolink sensor and binary_sensor (#100743)
This commit is contained in:
parent
fd1f0b0efe
commit
9306e60530
4 changed files with 21 additions and 2 deletions
|
@ -261,3 +261,8 @@ class YoLinkSensorEntity(YoLinkEntity, SensorEntity):
|
|||
return
|
||||
self._attr_native_value = attr_val
|
||||
self.async_write_ha_state()
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Return true is device is available."""
|
||||
return super().available and self.coordinator.dev_online
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue