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

Check session state in registered check to avoid using transferred servers more #5037

Merged

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Feb 8, 2025

Summary

#4650, #4975

This PR updates serverManager::isRegistered() which is used in many places as a general "does the app have a server" check, to also check that the server session is good to use (which internally checks the webhook/install ID existing and being valid).

The install ID is random and excluded from backups and transfers to avoid using the same registration/tokens on another device, which can resolve the issues if used at the correct time. However, it was only checked when launching the app, and any other entrypoints simply continued as if you had a server configured. With this change, many more features including sensor updates will return instead of re-using a (duplicate) registration.

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

@dshokouhi dshokouhi merged commit 4a3ece7 into home-assistant:master Feb 8, 2025
4 checks passed
@jpelgrom jpelgrom deleted the registered-check-sessionstate branch February 8, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants