-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 temperature cards not syncing #18463
Conversation
8dc91ff
to
3ba8788
Compare
try { | ||
await this.hass!.callService("climate", service, data); | ||
} catch (err: any) { | ||
this._error = err.message; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used in render?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this should be lokalized :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, it's not used in render. But when an exception is thrown and not caught, this method doesn't finish executing and as a result, doesn't revert the UI back to its original state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can catch the error and swallow? No need to set it as a property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the convention I saw in other cards. Maybe setting the error isn't necessary but I don't think swallowing an exception is a good practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The target temperature tile feature (or card feature in newer releases) does also support water heater entities. For the linting to pass, you may need to add the attributes "target_temp_low", and "target_temp_high" to the WaterHeaterEntity class.
Proposed change
Ensure the thermostat tile card, the thermostat card, and the thermostat dialog card keep their original values when an exception is thrown.
Demo:
ha_frontend_climate_sync_bug_fixed.mp4
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: