Bump reolink-aio to 0.6.0 (#94259)
This commit is contained in:
parent
fc1eab1e7e
commit
117ab4a0e5
6 changed files with 11 additions and 29 deletions
|
@ -30,8 +30,7 @@ async def async_setup_entry(
|
|||
) -> None:
|
||||
"""Set up update entities for Reolink component."""
|
||||
reolink_data: ReolinkData = hass.data[DOMAIN][config_entry.entry_id]
|
||||
if reolink_data.host.api.supported(None, "update"):
|
||||
async_add_entities([ReolinkUpdateEntity(reolink_data)])
|
||||
async_add_entities([ReolinkUpdateEntity(reolink_data)])
|
||||
|
||||
|
||||
class ReolinkUpdateEntity(
|
||||
|
@ -64,7 +63,10 @@ class ReolinkUpdateEntity(
|
|||
if not self.coordinator.data:
|
||||
return self.installed_version
|
||||
|
||||
return self.coordinator.data
|
||||
if isinstance(self.coordinator.data, str):
|
||||
return self.coordinator.data
|
||||
|
||||
return self.coordinator.data.version_string
|
||||
|
||||
async def async_install(
|
||||
self, version: str | None, backup: bool, **kwargs: Any
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue