Fix for Honeywell Round thermostats#9308
Merged
Merged
Conversation
This fixes an issue (home-assistant#8554) whereby the Honeywell thermostats stopped working after a period of hours or days. We do this by forgetting the authorisation token that was sent back to us when we first logged in, which causes the underlying evohomeclient library to perform the full login procedure again.
pvizeli
approved these changes
Sep 5, 2017
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes an issue (#8554) whereby the Honeywell thermostats stopped
working after a period of hours or days. We do this by forgetting the
authorisation token that was sent back to us when we first logged in,
which causes the underlying evohomeclient library to perform the full
login procedure again.
Description:
Fixes #8554 per my analysis in that issue's thread. The token issued by Honeywell eventually times out but the underlying library has no mechanism to renew the credential. This is achieved by setting the library's "user_data" field to None when an update error has occurred, so next time a full update is performed, the log-on procedure happen and we get a new auth token.
I've tested this fix out in my environment and had stable performance from the Honeywell component for over a week now.
Related issue (if applicable): fixes #8554
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Checklist:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests passREQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.