benct / lovelace-multiple-entity-row

Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI
MIT License
768 stars 55 forks source link

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

Open parautenbach opened 1 year ago

parautenbach commented 1 year ago

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: https://github.com/benct/lovelace-multiple-entity-row/issues/188#issuecomment-1605752723 https://github.com/benct/lovelace-multiple-entity-row/issues/188#issuecomment-1606112572 https://github.com/benct/lovelace-multiple-entity-row/issues/188#issuecomment-1606117646

ildar170975 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

I can see that working, thank you.