mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Always show state for the updater binary_sensor (#55584)
This commit is contained in:
parent
4310a7d814
commit
2171922265
@ -26,11 +26,14 @@ class UpdaterBinary(CoordinatorEntity, BinarySensorEntity):
|
|||||||
_attr_unique_id = "updater"
|
_attr_unique_id = "updater"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self) -> bool | None:
|
def available(self) -> bool:
|
||||||
"""Return true if the binary sensor is on."""
|
"""Return if entity is available."""
|
||||||
if not self.coordinator.data:
|
return True
|
||||||
return None
|
|
||||||
return self.coordinator.data.update_available
|
@property
|
||||||
|
def is_on(self) -> bool:
|
||||||
|
"""Return true if there is an update available."""
|
||||||
|
return self.coordinator.data and self.coordinator.data.update_available
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self) -> dict | None:
|
def extra_state_attributes(self) -> dict | None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user