* Improve OAuth error handling in configuration flows
* Update strings for all integrations that use oauth2 config flow
* Remove invalid_auth strings
* Revert change to release
* Revert close change in aiohttp mock
* Add modernized fitbit battery level sensor
* Use entity names for existing battery sensors
* Use icon from device class
* Update homeassistant/components/fitbit/strings.json
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update tests with lower case naming
* Swap the names of the device battery sensors
* Revert "Swap the names of the device battery sensors"
This reverts commit c9516f6d06.
* Update homeassistant/components/fitbit/sensor.py
Co-authored-by: Jan Vaníček <janvanicek@post.cz>
* Improve typing
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Jan Vaníček <janvanicek@post.cz>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix bug in fitbit credential import on token refresh
* Use stable test ids
* Update homeassistant/components/fitbit/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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_"