mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +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"
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool | None:
|
||||
"""Return true if the binary sensor is on."""
|
||||
if not self.coordinator.data:
|
||||
return None
|
||||
return self.coordinator.data.update_available
|
||||
def available(self) -> bool:
|
||||
"""Return if entity is available."""
|
||||
return True
|
||||
|
||||
@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
|
||||
def extra_state_attributes(self) -> dict | None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user