Hi, I would love to be able to add a security message for one very specific switch in my home.
Current Behavior:
Since this is a sensitive switch, I keep accessing it in the settings’ pane, where I have to perform many clicks to reach the entity and finally be able to switch the switch.
Dream Behavior:
Being able to add the switch to one Dashboard, and making sure that a popup windows shows up to ask me to confirm if I really want to perform this operation.
Alternative Behavior proposal:
Or make the “danger Dashboard” not only admin restricted (this is already possible), but accessible only if you type in again the password, or at least if you accept the warning “I hope you know what you’re doing”
Preliminary search:
I found an old topic regarding confirmation alert, but it seems to be an after-effect rather than a preventive measure : Add confirmation alert - #4 by aceindy
Thanks @cyn ! I had found the solution thanks to your link to documentation. So far this was my first yaml edit within HA (told you) as I had only used GUI options before
However, I’ll mark @JohnFLoki 's reply as the solution, since this is more straightforward.
I dont think so, you can programm around that by making 2 buttons, on with and one without and then make a condition to hide the other one depending on the state
There is, what I did was in my view, created a tile for the switch and made its visibility shown only when off for the switch entity. Then edited the view to add another tile card duplicate to the tile card initially created, and set it’s visibility shown when on but then edited it’s yaml for the icon tap action to toggle it with confirmation.