Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No confirmation with toggle switch on Entities card #19509

Closed
4 tasks done
wgstarks opened this issue Jan 22, 2024 · 3 comments
Closed
4 tasks done

No confirmation with toggle switch on Entities card #19509

wgstarks opened this issue Jan 22, 2024 · 3 comments

Comments

@wgstarks
Copy link

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

I have confirmations enabled on my entities card but when I tap the toggle switch I don't get the expected confirmation dialog. The entity just turns on/off immediately.

Screenshot 2024-01-22 at 9 35 34 AM

`type: entities
entities:

  • entity: sensor.greenhouse_temperature_humidity_greenhouse_temperature
  • entity: sensor.greenhouse_temperature_humidity_greenhouse_humidity
  • entity: switch.greenhouse_lights
  • entity: switch.greenhouse_heater_greenhouse_heater
    tap_action:
    confirmation:
    text: Are You Sure?
    action: toggle
  • entity: binary_sensor.front_door_1_front_door_1
  • entity: binary_sensor.front_door_2_front_door_2
    `

Describe the behavior you expected

Toggling the switch should open the confirmation dialog box rather than immediately performing the action.

Steps to reproduce the issue

1.Create entities card.
2.Add confirmation yaml code.
3.Toggle associated switch.
...

What version of Home Assistant Core has the issue?

2024.1.5

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Safari, Chrome, Firefox

Which operating system are you using to run this browser?

macOS 14.2.1

State of relevant entities

No response

Problem-relevant frontend configuration

type: entities
entities:
  - entity: sensor.greenhouse_temperature_humidity_greenhouse_temperature
  - entity: sensor.greenhouse_temperature_humidity_greenhouse_humidity
  - entity: switch.greenhouse_lights
  - entity: switch.greenhouse_heater_greenhouse_heater
    tap_action:
      confirmation:
        text: Are You Sure?
      action: toggle
  - entity: binary_sensor.front_door_1_front_door_1
  - entity: binary_sensor.front_door_2_front_door_2

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@karwosts
Copy link
Contributor

There's a substantial thread about this over in discussions:

#8905

Basically the tap action, and its associated confirmation, applies to clicking on the entity itself, not the toggle generated as part of the switch row.

@karwosts
Copy link
Contributor

If the confirmation is important, what you can do is to set type: simple-entity in the entity options, which will remove the toggle and just have a text label for the state, and then the only way to turn it on/off is through the tap-action, which would get the confirm.

I know it doesn't look as nice as the toggle though, so it's not a perfect solution 😕

@wgstarks
Copy link
Author

Thanks for the info but that's not going to work. Without a visual switch, radio button, etc. there's nothing to indicate where to click. The WAF will be zero and I've set this up just for her greenhouses. Hopefully the confirmation feature and tap actions will eventually be applied to all elements on the card.

I'll go ahead and close this report though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants