Confirmation Alert ("Are you really sure?") when switching switch

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

Tap Action has a confirmation option. Is that what you are looking for?

Maybe, but I’m quite the noob here and I don’t see any “Tap card” or anything in the dashboard options. Could you guide me more, please?

Sure, no problem. Tap Action is used on a number of cards, here’s the link to the documentation. Actions - Home Assistant

1 Like

Here is an example of a button:

show_name: true
show_icon: true
type: button
entity: input_button.turn_tv_on
show_state: false
tap_action:
  action: toggle
  confirmation: true

Important is the “confirmation: true” and the position within the code.

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 :smiley:
However, I’ll mark @JohnFLoki 's reply as the solution, since this is more straightforward.