Switch confirmation dialog (lovelace card)

Hi guys!

I have managed to use confirmation dialog for a button in lovelace, like this

type: button
tap_action:
  action: toggle
  confirmation:
    text: Are you sure you want to do it?
entity: switch.sonoff_computer_humidity

Now, I want to know how to add a confimation dialog for a swtich too, can someone please help me with this? I have this card

type: entities
entities:
  - entity: switch.sonoff_computer_humidity

Thank you in advance!

2 Likes

Nobody used confirmation for switch slider? :frowning:

1 Like

That is not yet supported by the standard frontend, although I agree we should add that.

In the meantime there are custom cards that can help to bridge the gap:

1 Like

Yes, I started to use this addon, it helps but it is not 100% what I wanted. Thank you!

2 Likes

FYI: I started a design discussion on how to handle the configuration for that, in case someone wants to chime in:

2 Likes

any update for switch confirmation popup?

5 Likes

Same question here — I have a few power switches I’d like to require confirmation on. Workarounds are just a little annoying.

3 Likes

This thread doesn’t seem to be a feature request, but I’d love to vote for this one also.

3 Likes

I need this too please :pray:t2:

1 Like

For a switch, it would be nice to have two confirmations, one for each state direction and the option to omit a state direction confirmation. For example, confirm switching off but not for switching on.
Then think about adding confirmation when there is an external condition. For example if someone is detected in the space, then confirm the switch operation.
The whole confirmation idea ought to be thought out and apply at any action. Confirmation should encompass an optional security option, like additional an additional security option that might be mild or hardened.

1 Like