8000 Retry updating thermostat settings by iprak · Pull Request #75 · iprak/sensi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Retry updating thermostat settings #75

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

Merged
merged 7 commits into from
Jan 23, 2025
Merged

Retry updating thermostat settings #75

merged 7 commits into from
Jan 23, 2025

Conversation

iprak
Copy link
Owner
@iprak iprak commented Jan 23, 2025

This PR attempts to retry the operation once.

Testing and mobile app investigation showed that

  • The set web methods don't return failure status. The mobile doesn't check the return status.
  • Forcing an update with 3-4 seconds after set sometimes brought in stale data.
  • In that case, re-doing the set operation again would usually correct the thermostat state.

With this in mind, the set operation

  • Invokes the set method end point
  • Updates HomeAssistant's thermostat state
  • Registers a re-try operation upon state update.
  • Force a data refresh after 3 seconds
  • Upon state update, if the new data for the property set doesn't match the expected set value, then a single retry is invoked.

This PR along with #74 should give better handling of #73.

iprak added 7 commits January 19, 2025 16:41
The property name, value and setter are registered when the setter is
invoked. The expected value is compared against the property upon
update. In case of mismatch the setter is invoked again.
@iprak iprak merged commit f3793e1 into master Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0