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

The double_tap_action for main entity not working when clicking on the entity's state #309

Open
parautenbach opened this issue Jun 25, 2023 · 4 comments

Comments

@parautenbach
Copy link

Double clicking works fine for the main entity when it's on the name/label, but not on the column with the (main entity's) state value.

Minimal example.

type: entities
entities:
  - type: custom:multiple-entity-row
    entity: switch.test_switch
    state_header: Grid
    tap_action:
      action: more-info
    double_tap_action:
      action: toggle
      confirmation: true
    entities:
      - entity: input_number.test_number
        name: Target

See these messages and replies for more info:
#188 (comment)
#188 (comment)
#188 (comment)

@ildar170975
Copy link

ildar170975 commented Jun 25, 2023

My dummy-user-guess is that these tap_action, double_tap_action etc for the main entity's name come from a "standard HA library", and these "columns" (for additional entities & main entity's state) are custom elements...

Consider this as a demo & a kind of workaround:
image
Note a difference between confirmation dialogues.
The "name's" confirmation is STANDARD, the "column's" confirmation is CUSTOM.

@parautenbach
Copy link
Author

Yeah, good guess. I think you're right. (I haven't built any custom cards – only custom components – so I don't know that side of the framework.)

@ildar170975
Copy link

So, my proposal for you is:
-- remove displaying the main entity's state
-- add the main sensor as ADDITIONAL;
-- define tap_action for this additional sensor to toggle.
A bit less elegant - but functional...

@parautenbach
Copy link
Author

I can see that working, thank you.

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