thomasloven / lovelace-auto-entities

🔹Automatically populate the entities-list of lovelace cards
MIT License
1.2k stars 111 forks source link

Name as attribute #339

Closed ghallford-uhn closed 1 year ago

ghallford-uhn commented 1 year ago

Is it possible to make the name on the card, an attribute of the entity as opposed to the friendly_name? This is for the mini-media-player card. Is there a variable for the "target" or something? Was thinking something like {{ state_attr('target','username') }}


type: vertical-stack
cards:
  - type: markdown
    content: '# PLEX MEDIA PLAYERS'
  - type: custom:auto-entities
    card:
      type: entities
    entities: []
    filter:
      include:
        - entity_id: media_player.plex*
          state: playing
          options:
            type: custom:mini-media-player
            name: <<<CAN I MAKE THIS AN ATTRIBUTE OF THE MEDIA_PLAYER ENTITY?>>>
            artwork: material
            hide:
              controls: true
              volume: true
              power: true
              icon: true
        - entity_id: media_player.plex*
          state: paused
          options:
            type: custom:mini-media-player
            name: <<<CAN I MAKE THIS AN ATTRIBUTE OF THE MEDIA_PLAYER ENTITY?>>>
            artwork: material
            hide:
              controls: true
              volume: true
              power: true
              icon: true
      exclude: []
    sort:
      method: none
      show_empty: false
    show_empty: false
ghallford-uhn commented 1 year ago

opened under wrong account