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

Confirmation dialog fails if Toggle feature is enabled on a Tile card #24557

Open
4 tasks done
tramperb opened this issue Mar 8, 2025 · 3 comments
Open
4 tasks done
Labels
Feature Request Should be a discussion

Comments

@tramperb
Copy link

tramperb commented Mar 8, 2025

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 a confirmation dialog popup in a tile card yaml - works as expected. However, when I enable a toggle on the card (new feature with 2025.3.0), the confirmation is ignored.

entity: switch.efruit_out
name: eFruit tree sprays
icon: mdi:watering-can
hold_action:
  action: more-info
tap_action:
  action: perform-action
  confirmation:
    text: Turn on eFruit tree sprays ?
  perform_action: switch.turn_on
  target:
    entity_id: switch.efruit_out
icon_tap_action:
  action: none
color: primary
grid_options:
  columns: 12
  rows: 1
visibility:
  - condition: state
    entity: switch.efruit_out
    state: "off"
features_position: bottom
vertical: false
features:
  - type: toggle

With the last 2 lines, tap action enables the switch, without popping up the confirmation.
Without the last 2 lines, the confirmation dialog pops up & works as expected.
No error is recorded in the log.

Describe the behavior you expected

Details above

Steps to reproduce the issue

  1. Enable Toggle on a Tile card with confirmation popup.

...

What version of Home Assistant Core has the issue?

2025.3.1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue?

Browser independent

Which operating system are you using to run this browser?

OS independent

State of relevant entities

Problem-relevant frontend configuration

Javascript errors shown in your browser console/inspector

Additional information

No response

@tramperb tramperb changed the title Confirmation dialog fails if toggle is enabled on a Tile card Confirmation dialog fails if Toggle feature is enabled on a Tile card Mar 8, 2025
@tramperb
Copy link
Author

tramperb commented Mar 8, 2025

As a guess, I think the feature toggle just toggles the entity without looking to see if tap_action is defined in the card's yaml.

@karwosts
Copy link
Contributor

karwosts commented Mar 8, 2025

Yes tap_actions and tile features are completely separate things. AFAIK no tile features have ever supported confirmation dialogs yet.

Long running discussion about confirmations on toggles (which we pretty much won't support): #8905

@karwosts karwosts added the Feature Request Should be a discussion label Mar 8, 2025
@tramperb
Copy link
Author

tramperb commented Mar 9, 2025

Thanks for the link - interesting reading. I am definitely in the camp of @mfenske and others : "If a user prefers to stick to [existing] ui-guidelines, [they] wouldn’t implement a guard on a switch. To argue with “design decision” in a mostly editable GUI make no sense."

I know I can work around the issue but by adding the toggle feature to the Tile card (useful as it provides a good visual for switch state), a logic flaw is created - click on toggle evades the confirmation dialog that the user has implemented.

edited to add : Quote from HA https://www.home-assistant.io/blog/2024/04/03/release-20244/#lock-behavior-improvements
"we have improved the behavior of locks in our user interface by requiring you to confirm the action."
So, the guidelines have already been compromised for this special case. Imo, it would be consistent to implement this as an option for any toggle.

One more user asking for a rethink :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Should be a discussion
Projects
None yet
Development

No branches or pull requests

2 participants