* Add reauth support in fitbit
* Update tests/components/fitbit/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Improve http status error code handling
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Cleanup fitbit sensor API parsing
* Remove API code that is not used yet
* Configuration flow for fitbit
* Code cleanup after manual review
* Streamline code for review
* Use scopes to determine which entities to enable
* Use set for entity comparisons
* Apply fitbit string pr feedback
* Improve fitbit configuration flow error handling
* Apply suggestions from code review
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Fix typo in more places
* Revert typing import
* Revert custom domain back to default
* Add additional config flow tests
* Add breaks_in_ha_version to repair issues
* Update homeassistant/components/fitbit/api.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Increase test coverage for token refresh success case
* Add breaks_in_ha_version for sensor issue
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Simplify translations, issue keys, and token refresh
* Config flow test improvements
* Simplify repair issue creation on fitbit import
* Remove unused strings
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Cleanup fitbit sensor API parsing
* Remove API code that is not used yet
* Remove dead code for battery levels
Small API parsing cleanup
* Address PR feedback
* Update homeassistant/components/fitbit/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove comma thousands formatting
* Add calorie and bpm to units
* Updating device and state classes
* Revert "Updating device and state classes"
This reverts commit ae77cf3cd7.
* Revert "Add calorie and bpm to units"
This reverts commit 7d82bb1c12.
* Removing unnecessary formatting
* Set unique ID for fitbit sensors, including the user ID
* Remove fitbit_ from unique ids (see: https://developers.home-assistant.io/docs/entity_registry_index/#unique-id)
* change fitbit user_profile type to dict[str, Any]
* Fitbit: define a default unique ID, and add battery info if present
* No need for trailing _battery in unique ID, since it already contains "devices/battery_"
* Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const
* Fix pylint
* Use in tests
* Search for "client_id"
* Fix tests
* Fix test
* Fix test