#Adding confirmation

1 messages · Page 1 of 1 (latest)

signal gate
#

when im adding this wall socket 1 icon press or text press it asks it but when press on the toggle it doesn't ask it does any one got any ideas?

type: entities
entities:

  • entity: switch.wall_socket_1
    icon: mdi:power-socket-de
    name: Wall Socket 1
    tap_action:
    action: toggle
    confirmation:
    text: Sure?
  • entity: switch.wall_socket_2
    icon: mdi:power-socket-de
    name: Wall Socket 2
  • entity: switch.shelly_plug_s
    name: 3D Printer
    icon: mdi:power-plug
  • entity: switch.shellyplugsg3_54320467936c_switch_0
    name: Server
    icon: mdi:power-plug
    title: Wall Socket
    show_header_toggle: false
    state_color: true
timber drift
#

UPDATE: I spoke too soon. It does work, but you have to tap the entity's name and not the actual toggle. Seems like a weird design... Might be a bug.
It seems like the Entities card does not support confirmation. I couldn't get it to work (either using an action of toggle or perform-action) but it worked fine in a Button card. ```yaml
type: button
entity: input_boolean.tester
icon: mdi:power-socket-de
name: Wall Socket 1
tap_action:
action: toggle
confirmation:
text: Are you sure you want to restart?

#
type: entities
entities: 
  - entity: input_boolean.tester
    icon: mdi:power-socket-de
    name: Wall Socket 1
    tap_action:
      action: toggle
      confirmation:
        text: Are you sure you want to restart?
timber drift
#

Another update. Looks like this is something that was mentioned in 2021. Design review: Confirmation for toggles There was some work done on it last year. Add confirmations to some interactive entity-rows #21453. The PR added confirmations to button/input-button, lock, scene, and script entities. For a simple confirmation, confirmation: true would go inline with the supported entity and ```yaml
confirmation:
text: Are you sure you want to restart?

@cloud folio This is something that you worked on. Do you know of any updates or plans for this?
cloud folio
#

Not aware of any updates. I know UX was firm that a toggle switch should not have a confirmation.