benct / lovelace-multiple-entity-row

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

Allow current entity state in entities without repeating entity ID #340

Open twpol opened 3 months ago

twpol commented 3 months ago

I am currently unable to show the main entity's state in the entities list without repeating the entity ID. This would normally be fine (apart from extra typing) but I don't see a way to make it work inside custom:auto-entities. I love both these extensions and would love them to work together even better. :)

In #273 (the same issue but for secondary info area), you can specify an icon as a workaround because the icon is ignored there.

This works but repeats the entity ID:

type: entities
entities:
  - entity: person.james_ross
    type: custom:multiple-entity-row
    entities:
      - entity: person.james_ross

This does not work, gives validation error: Entity object requires at least one 'entity', 'attribute' or 'icon'.

type: entities
entities:
  - entity: person.james_ross
    type: custom:multiple-entity-row
    entities:
      - {}

I can see three ways we could make this work:

I haven't been able to find any such special values in the code or documentation, but I might have missed it if they do exist. Sorry if that's the case!

ildar170975 commented 3 months ago

May be I am missing something - but have you tried

  - entity: person.james_ross
    type: custom:multiple-entity-row

if you need to show this entity only. Ofc m-e-r is supposed to be used to show multiple entities mainly; and in auto-entities you will have to use a “template” filter in many cases.

In general, you are asking a QUESTION, not reporting a bug. So I would suggest to use a dedicated Community thread.