Update fitbit device fetch to use a data update coordinator (#101619)
* Add a fitbit device update coordinator * Remove unnecessary debug output * Update comments * Update fitbit coordinator exception handling and test coverage * Handle reauth failures in other sensors * Fix scope changes after rebase.
This commit is contained in:
parent
6d1876394e
commit
d78ee96e2a
8 changed files with 389 additions and 132 deletions
|
@ -134,10 +134,10 @@ class FitbitApi(ABC):
|
|||
return await self._hass.async_add_executor_job(func)
|
||||
except HTTPUnauthorized as err:
|
||||
_LOGGER.debug("Unauthorized error from fitbit API: %s", err)
|
||||
raise FitbitAuthException from err
|
||||
raise FitbitAuthException("Authentication error from fitbit API") from err
|
||||
except HTTPException as err:
|
||||
_LOGGER.debug("Error from fitbit API: %s", err)
|
||||
raise FitbitApiException from err
|
||||
raise FitbitApiException("Error from fitbit API") from err
|
||||
|
||||
|
||||
class OAuthFitbitApi(FitbitApi):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue