-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Always reload after a successful reauth flow #116026
Conversation
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.
Please add tests which pass with the changes in this PR and fail without them.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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 👍
../Frenck
Thnx! |
Proposed change
This PR will update the helper
async_update_reload_and_abort
is to always reload after a successful reauth flow by default.When the entry needs attention, this can e.g. be due to a temporary disabled account. In cased where the entry is not updated, because the credentials did not change, we still want to reload the entry as this helper promises after a successful re-auth flow. Otherwise the entry might stay in its faulty state.
For backwards compatibility, it is still possible to fall back to the old behavior by passing
reload_even_if_entry_is_unchanged=False
.Type of change
Additional information
Checklist
ruff format 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: