Bump pyopenuv to 2023.02.0 (#88039)

This commit is contained in:
Aaron Bach 2023-02-13 16:40:49 -07:00 committed by GitHub
parent e0235fbb30
commit b4c343b1a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 14 deletions

View file

@ -6,7 +6,7 @@ from typing import Any, cast
from pyopenuv.errors import InvalidApiKeyError, OpenUvError
from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntry
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers.debounce import Debouncer
@ -60,14 +60,4 @@ class OpenUvCoordinator(DataUpdateCoordinator):
except OpenUvError as err:
raise UpdateFailed(str(err)) from err
# OpenUV uses HTTP 403 to indicate both an invalid API key and an API key that
# has hit its daily/monthly limit; both cases will result in a reauth flow. If
# coordinator update succeeds after a reauth flow has been started, terminate
# it:
if reauth_flow := next(
iter(self._entry.async_get_active_flows(self.hass, {SOURCE_REAUTH})),
None,
):
self.hass.config_entries.flow.async_abort(reauth_flow["flow_id"])
return cast(dict[str, Any], data["result"])