thomasloven / lovelace-fold-entity-row

🔹 A foldable row for entities card, containing other rows
MIT License
587 stars 38 forks source link

Change name of the entity in the Head? #244

Closed Jeppedy closed 7 months ago

Jeppedy commented 7 months ago

I don't see in the documentation any way to change the name of the entity used in the Head. Everything works as it should, but I only see a way to give a name to the Head entry if it's a Section.

I'm glad to be wrong.

ildar170975 commented 7 months ago

Like you do in a standard Entities card. Use “name” option.

For a section - use “label”.

thomasloven commented 7 months ago

See the third NOTE: section in the readme.

Jeppedy commented 7 months ago

Like you do in a standard Entities card. Use “name” option.

For a section - use “label”.

Oddly, that does not work for me

type: entities
entities:
  - type: custom:fold-entity-row
    head: binary_sensor.master_bed_presence_presence
    name: Bedroom Presence
    entities:
      - entity: sensor.master_bed_presence_motion_state
        name: State
      - entity: number.master_bed_presence_fading_time
        name: Fade

The Head entity uses only the name of the entity, not the one specified.

Jeppedy commented 7 months ago

See the third NOTE: section in the readme.

Thank you for both your reply and your valuable enhancement. Perhaps to some, the third NOTE: section speaks to this, but I've read the Entities card docs, and see nowhere that tells me how to resolve that the "name:" attribute does not change the name of the Head entity. See my reply to Ildar for my YAML snippet.

ildar170975 commented 7 months ago

Try

head:
  entity: xxx
  name: xxx