mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Fixed unhandled exception in OpenUV data update (#23611)
This commit is contained in:
parent
f0c582ebbd
commit
75abfd49ef
@ -162,7 +162,13 @@ async def async_setup_entry(hass, config_entry):
|
|||||||
async def update_data(service):
|
async def update_data(service):
|
||||||
"""Refresh OpenUV data."""
|
"""Refresh OpenUV data."""
|
||||||
_LOGGER.debug('Refreshing OpenUV data')
|
_LOGGER.debug('Refreshing OpenUV data')
|
||||||
await openuv.async_update()
|
|
||||||
|
try:
|
||||||
|
await openuv.async_update()
|
||||||
|
except OpenUvError as err:
|
||||||
|
_LOGGER.error('Error during data update: %s', err)
|
||||||
|
return
|
||||||
|
|
||||||
async_dispatcher_send(hass, TOPIC_UPDATE)
|
async_dispatcher_send(hass, TOPIC_UPDATE)
|
||||||
|
|
||||||
hass.services.async_register(DOMAIN, 'update_data', update_data)
|
hass.services.async_register(DOMAIN, 'update_data', update_data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user