Open jensrossbach opened 4 days ago
Good catch. The logic for handling confirmations and changing the current selector option are separate and there isn't a good way to prevent the selector from not changing on option click, but I can mitigate it.
I've modified the selector logic to better change it's value on click, to modify the option classes after render (which seems to work more consistently than on render), and to always request a render update after the value from hass delay timer expires (which seems to reset it to it's old value consistently). I've also added Update after action delay
time as an option in the selector UI.
Can you try the 4.1.0 alpha? I think I've mostly mitigated the issue so that if the confirmation is not selected, it'll revert to it's old value by retrieving it from the hass object after 1000ms (default) or whatever the user sets for the selector.
Checklist:
Release with the issue: 4.0.10
Last working release (if known): n/a
Browser and Operating System: Home Assistant companion app on iOS 18
Description of problem: I have configured a tile card with a custom feature. The custom feature is a selector with two options to turn on and off a light. The 'off' option additionally has a confirmation. When the light is on and I press on the 'off' option, the confirmation dialog is shown (as expected) but in the same moment, the selector switches to the 'off' option. When I then cancel the confirmation dialog, the selector is on the 'off' option although the light is still on.
Javascript errors shown in the web inspector (if applicable): n/a
Your Full Card Config
Additional information: n/a