Skip to content

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

@twpol

Description

@twpol

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:

  • Allow no properties (as in my example above) which would use the main entity, state, no icon - exactly as if the entity ID was the only thing specified
  • Add a special value to entity that passes validation but refers to the main entity
  • Add a special value to attribute that passes validation but refers to the state instead

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions