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
|
@ -136,3 +136,8 @@ class YoLinkBinarySensorEntity(YoLinkEntity, BinarySensorEntity):
|
|||
state.get(self.entity_description.state_key)
|
||||
)
|
||||
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