How to set a confirmation on a script in an entities card

Back to some basics… how to get this confirmation popup on clicking the script in an entities card:

  - type: entities
    title: Audio settings
    show_header_toggle: false
    entities:
      - #few other entities
      - entity: script.audio_system_off
        action_name: 'Off'
        tap_action:
          confirmation:
            text: Are you sure?

trying to figure out this, but somehow it isnt clear to me…

currently showing (the bottom entity)

there is no confirmation showing st all, and clicking the ‘Off’ immediately runs the script.

please have a look

Where did you get this from?

I don’t see it as a valid option anywhere. Try this:

      - entity: script.audio_system_off
        tap_action:
          confirmation:
            text: Are you sure?

using it on all scripts in my setup: Entities Card - Home Assistant
replacing the former action name in the script config itself

So much better than the default ‘Execute’

Maybe a Pr changing that into ‘Run’ would be a first step in making this particular piece of HA interface a bit friendlier on the eye.

And unfortunately taking it out makes no difference for the confirmation. thanks, Im glad I am not the only one :wink:

seems we need to configure it as a button first, but then lose all configurations of the script itself, and have to reconfigure those form the button:

      - type: button
        name: Audio system off
        icon: mdi:audio-video-off
        tap_action:
          action: call-service
          confirmation:
            text: Are you sure?
          service: script.audio_system_off

results in:


Note we can’t set the action_name any longer, and, it now Is called Run :wink:

file a FR in the Frontend: add confirmation option for script in entities card · home-assistant/frontend · Discussion #8249 · GitHub

2 Likes