Bump reolink-aio to 0.5.1 and check if update supported (#88641)
This commit is contained in:
parent
87dc692a20
commit
23b52025f9
5 changed files with 8 additions and 4 deletions
|
@ -79,6 +79,9 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||
|
||||
async def async_check_firmware_update():
|
||||
"""Check for firmware updates."""
|
||||
if not host.api.supported(None, "update"):
|
||||
return False
|
||||
|
||||
async with async_timeout.timeout(host.api.timeout):
|
||||
try:
|
||||
return await host.api.check_new_firmware()
|
||||
|
|
|
@ -13,5 +13,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/reolink",
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["reolink_aio"],
|
||||
"requirements": ["reolink-aio==0.5.0"]
|
||||
"requirements": ["reolink-aio==0.5.1"]
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ async def async_setup_entry(
|
|||
) -> None:
|
||||
"""Set up update entities for Reolink component."""
|
||||
reolink_data: ReolinkData = hass.data[DOMAIN][config_entry.entry_id]
|
||||
async_add_entities([ReolinkUpdateEntity(reolink_data)])
|
||||
if reolink_data.host.api.supported(None, "update"):
|
||||
async_add_entities([ReolinkUpdateEntity(reolink_data)])
|
||||
|
||||
|
||||
class ReolinkUpdateEntity(ReolinkBaseCoordinatorEntity, UpdateEntity):
|
||||
|
|
|
@ -2237,7 +2237,7 @@ regenmaschine==2022.11.0
|
|||
renault-api==0.1.12
|
||||
|
||||
# homeassistant.components.reolink
|
||||
reolink-aio==0.5.0
|
||||
reolink-aio==0.5.1
|
||||
|
||||
# homeassistant.components.python_script
|
||||
restrictedpython==6.0
|
||||
|
|
|
@ -1585,7 +1585,7 @@ regenmaschine==2022.11.0
|
|||
renault-api==0.1.12
|
||||
|
||||
# homeassistant.components.reolink
|
||||
reolink-aio==0.5.0
|
||||
reolink-aio==0.5.1
|
||||
|
||||
# homeassistant.components.python_script
|
||||
restrictedpython==6.0
|
||||
|
|
Loading…
Add table
Reference in a new issue