Skip to content
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

Fix config upgrades #356

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Fix config upgrades #356

merged 1 commit into from
Mar 4, 2024

Conversation

danelphick
Copy link
Contributor

The previous update changed the major version of the config from 1 to 2 and then made it so thatmigration always failed. The intention was that reconfiguration would somehow automatically fix this, but sadly that didn't work. With this change the config is automatically migrated to 2. Just to make this more complicated, the HA API for this is changing in 2024.3, so there are two code paths to handle the version change.

The API key is then checked during initialization and if it doesn't work, ConfigEntryAuthFailed is raised. This shows up as a repair in settings which prompts the user to enter an API key.

Also updates the documentation to remove references to username/password and fixes a bug where it tried to refresh the old-style authentication token.

The previous update changed the major version of the config from 1 to 2
and then made it so thatmigration always failed. The intention was that
reconfiguration would somehow automatically fix this, but sadly that
didn't work. With this change the config is automatically migrated to 2.
Just to make this more complicated, the HA API for this is changing in
2024.3, so there are two code paths to handle the version change.

The API key is then checked during initialization and if it doesn't
work, ConfigEntryAuthFailed is raised. This shows up as a repair in
settings which prompts the user to enter an API key.
@nathanmarlor nathanmarlor merged commit 87cc924 into nathanmarlor:main Mar 4, 2024
1 of 3 checks passed
@nathanmarlor nathanmarlor added the bug Something isn't working label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants