New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Fitbit integration to allow UI based configuration #100897
Update Fitbit integration to allow UI based configuration #100897
Conversation
953fc71
to
5626e2d
Compare
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. I improved test coverage to try to make some of the checks happier as well.
Now this PR is looking for additional input on the import config flow to make sure we're coverage the cases right. Reviewers, check out the config flow tests to see what the cases look like.
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
There is a codecov check that appears incorrect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Proposed change
Update Fitbit integration to allow UI based configuration entries.
Given the existing features, this is a larger PR than I was hoping. This could be split into smaller PRs if we didn't have to worry about backwards compatibility with existing configuration. Open to suggestions for how to make this smaller.
The authentication system has been reworked to use application credentials. See the Fitbit Developer Guide: Authorization for details on the authentication.
The old approach was configured with these steps:
This change will import credentials into application credentials if they already exist.
The existing settings for which entities to add, clock format, and units are imported automatically. For new integrations, the entities to include are now automatically determined based on the allowed scopes enabled by the user.
TODO: Link to documentation
This is pulled out of a larger overhaul to modernize the fitbit integration and make it configurable from the UI and following current design standards, similar to previous approach on Google calendar :
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: