mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Set Synology DSM update entity to unavailable in case no data from api gathered (#79508)
This commit is contained in:
parent
d6a6d0d754
commit
d7be3c8780
@ -52,6 +52,11 @@ class SynoDSMUpdateEntity(SynologyDSMBaseEntity, UpdateEntity):
|
|||||||
entity_description: SynologyDSMUpdateEntityEntityDescription
|
entity_description: SynologyDSMUpdateEntityEntityDescription
|
||||||
_attr_title = "Synology DSM"
|
_attr_title = "Synology DSM"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def available(self) -> bool:
|
||||||
|
"""Return True if entity is available."""
|
||||||
|
return bool(self._api.upgrade)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def installed_version(self) -> str | None:
|
def installed_version(self) -> str | None:
|
||||||
"""Version installed and in use."""
|
"""Version installed and in use."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user