Public Member Functions | |
| None | __init__ (self, HomeAssistant hass, FitbitUnitSystem|None unit_system=None) |
| dict[str, Any] | async_get_access_token (self) |
| list[FitbitDevice] | async_get_devices (self) |
| dict[str, Any] | async_get_latest_time_series (self, str resource_type) |
| FitbitUnitSystem | async_get_unit_system (self) |
| FitbitProfile | async_get_user_profile (self) |
Private Member Functions | |
| Fitbit | _async_get_client (self) |
| _T | _T (self, Callable[[], _T] func) |
Private Attributes | |
| _hass | |
| _profile | |
| _unit_system | |
Fitbit client library wrapper base class. This can be subclassed with different implementations for providing an access token depending on the use case.
| None homeassistant.components.fitbit.api.FitbitApi.__init__ | ( | self, | |
| HomeAssistant | hass, | ||
| FitbitUnitSystem | None | unit_system = None |
||
| ) |
|
private |
|
private |
| dict[str, Any] homeassistant.components.fitbit.api.FitbitApi.async_get_access_token | ( | self | ) |
Return a valid token dictionary for the Fitbit API.
Reimplemented in homeassistant.components.fitbit.api.ConfigFlowFitbitApi, and homeassistant.components.fitbit.api.OAuthFitbitApi.
| list[FitbitDevice] homeassistant.components.fitbit.api.FitbitApi.async_get_devices | ( | self | ) |
| dict[str, Any] homeassistant.components.fitbit.api.FitbitApi.async_get_latest_time_series | ( | self, | |
| str | resource_type | ||
| ) |
| FitbitUnitSystem homeassistant.components.fitbit.api.FitbitApi.async_get_unit_system | ( | self | ) |
Get the unit system to use when fetching timeseries. This is used in a couple ways. The first is to determine the request header to use when talking to the fitbit API which changes the units returned by the API. The second is to tell Home Assistant the units set in sensor values for the values returned by the API.
| FitbitProfile homeassistant.components.fitbit.api.FitbitApi.async_get_user_profile | ( | self | ) |
|
private |
|
private |