home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.95k stars 2.67k forks source link

using attribute option in entities card does not show the attribute name (but defaults to the main entity) #19840

Open Mariusthvdb opened 6 months ago

Mariusthvdb commented 6 months ago

Checklist

Describe the issue you are experiencing

using a simple Dashboard like:

    entities:
      - type: attribute
        entity: sun.sun
        attribute: next_rising
        # name: Volgende Zonsopkomst
        icon: mdi:weather-sunset-up
        format: time
      - type: attribute
        entity: sun.sun
        attribute: next_setting
        # name: Volgende Zonsondergang
        icon: mdi:weather-sunset-down
        format: relative

shows like

Scherm­afbeelding 2024-02-20 om 14 07 33

where one would expect the name or preferably the translated name of that attribute:

Scherm­afbeelding 2024-02-20 om 14 01 18

we have to explicitly set the name: option as commented in above example, to result in something like

Scherm­afbeelding 2024-02-20 om 14 07 59

this feels like an issue which should have been reported long time ago, but that never happened as far as I could find.

Describe the behavior you expected

use (translated) name of configured attribute , just like the state of that attribute is used.

Steps to reproduce the issue

  1. use config above
  2. ...

What version of Home Assistant Core has the issue?

2024.3.0.dev20240220 (but also in any version below)

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

any

Which operating system are you using to run this browser?

Sonoma 14.2.1

State of relevant entities

frontend 20240220.0.dev

Problem-relevant frontend configuration

entities:
      - type: attribute
        entity: sun.sun
        attribute: next_rising
        # name: Volgende Zonsopkomst
        icon: mdi:weather-sunset-up
        format: time
      - type: attribute
        entity: sun.sun
        attribute: next_setting
        # name: Volgende Zonsondergang
        icon: mdi:weather-sunset-down
        format: relative

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

spacegaier commented 6 months ago

I agree, the attribute name would be more logical, but changing that now, would "break" existing dashboards. For those kind of changes the team has in the past received a lot of flak.

Arguments pro changing it: Attribute entity rows are probably not the most common use case (so lesser negative impact) plus I could imagine that many users that make use of them, manually set an overwritten name to have something more meaningful than the entity name, so they would not be affected and could in fact clean up their YAML if the wanted.

Mariusthvdb commented 6 months ago

thanks for responding.

what is more btw, is that the more-info on those attributes default to the entity.. which really is strange, if you are not aware this is an attribute (and most users of the Dash are not, as they didnt create it)

it would really be nice if we could change that (though I can see the 'backwards incompatibility, well, almost) ;-)

github-actions[bot] commented 3 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Mariusthvdb commented 3 months ago

keep

github-actions[bot] commented 57 minutes ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.