benct / lovelace-multiple-entity-row

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

allow use of entity in the multiple entity row #23

Closed Mariusthvdb closed 4 years ago

Mariusthvdb commented 4 years ago

HI,

please consider allowing referencing the config entity in the multiple entity rows, (ie when not referencing an outside entity):

  - entity: vacuum.vacuum_cleaner
    type: custom:multiple-entity-row
    primary:
      entity: entity
      attribute: battery_level
      name: Battery
      unit: '%'
    secondary:
      entity: entity
      attribute: status
      name: Status

or maybe even:

  - entity: vacuum.vacuum_cleaner
    type: custom:multiple-entity-row
    primary:
      attribute: battery_level
      name: Battery
      unit: '%'
    secondary:
      attribute: status
      name: Status

instead of:

  - entity: vacuum.vacuum_cleaner
    type: custom:multiple-entity-row
    primary:
      entity: vacuum.vacuum_cleaner
      attribute: battery_level
      name: Battery
      unit: '%'
    secondary:
      entity: vacuum.vacuum_cleaner
      attribute: status
      name: Status

there's no need to keep repeating the entity, if set in the main config. Keep things short and simple.

And, it would make it so much easier to use the card in other cards or templates (like decluttering templates) Maybe even auto entities, though I am not sure that will go...

anyways, thanks!

benct commented 4 years ago

I've actually considered making that possible several times, just always popped up more important stuff to fix. I'll try to get that implemented soon though :)

benct commented 4 years ago

Should now be supported in version 2.2.0 (55eda45)