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

Resync thermostat card setpoint values if service call fails #15497

Merged

Conversation

karwosts
Copy link
Contributor

Proposed change

If user uses thermostat card to update a thermostat setpoint, it optimistically assumes the setpoint value actually changes. If the call service fails for some reason and the entity setpoints never update, then the thermostat card remains out of sync with the entity, showing the wrong setpoints.

This change waits 2 seconds after the call service, and if the entity has not updated its setpoints within that time, it reverts the thermostat card to showing the current entity setpoints.

This copies the same behavior as the thermostat more-info dialog, which already does this.

thermostat_setpoints_revert

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@jbouwh
Copy link
Contributor

jbouwh commented Feb 20, 2023

Would probably also solve: #14961

@bramkragten bramkragten self-requested a review February 20, 2023 19:45
@bramkragten bramkragten merged commit 850609b into home-assistant:dev Feb 21, 2023
@karwosts karwosts deleted the thermostat-card-resync-setpoint branch March 6, 2023 16:31
@github-actions github-actions bot locked and limited conversation to collaborators Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thermostat card not updating correctly
3 participants