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

Tap actions do not work for sub items if they do not have an entity #337

Open i00 opened 5 days ago

i00 commented 5 days ago

I want to have a sub item without an entity so that I can show some custom text so I have:

- entity: none
  default: 'Boost'
  tap_action:
    action: navigate
    navigation_path: /lovelace/ev-boost

It looks like you can click on it - but if the entity is set up this way, clicking on it does nothing!

ildar170975 commented 5 days ago

According to docs:

if you define entities as objects, either entity, attribute or icon needs to be specified

and if you define an entity option - it is supposed to have a valid entity_id: image

means - your working trick with entity: none is not officially supported.

From my understanding the source code, processing a tap_action here NEEDS an valid defined entity - either THIS entity or a main entity. Since you defined a non-existing entity - tap_action is not processed. Just my guess.