whats-up-docker icon indicating copy to clipboard operation
whats-up-docker copied to clipboard

Labels too long in homeassistant

Open ioull opened this issue 2 years ago • 2 comments

Since the last homeassistant update, the name of the entity is concatained with the name of the device : For example instead of "adguardhome", I get "What's up docker? Adguardhome"

Here is a screenshot : image

ioull avatar Aug 16 '23 14:08 ioull

I was struggling with the same, for now solved it with the replace filter | regex_replace('What\'s up docker\? ','')

This is how it looks in the card configuration, I'm using some custom cards, but this should work with other configurations as well:

type: custom:auto-entities
card:
  title: Available Updates
  type: entities
show_empty: false
filter:
  include:
    - entity_id: update.*
      attributes:
        update_available: true
      options:
        type: custom:template-entity-row
        name: >-
          {{ state_attr(config.entity, 'friendly_name')| regex_replace('What\'s
          up docker\? ','') }}
        state: >-
          {{ state_attr(config.entity, 'installed_version' )}} → {{
          state_attr(config.entity, 'latest_version') }}
        icon: mdi:update
Bildschirmfoto 2023-09-29 um 09 53 59

laberning avatar Sep 29 '23 07:09 laberning

Leaving this for the next one that has a similar issue, use the display_name attribute instead of friendly_name

Rembock avatar Mar 11 '24 22:03 Rembock