marcokreeft87 / room-card

Show multiple entity states, attributes and icons in a single card in Home Assistant's Lovelace UI
MIT License
216 stars 36 forks source link

Show friendly name instead of attribute in info_entities #190

Open hugalafutro opened 1 year ago

hugalafutro commented 1 year ago

Is your feature request related to a problem? Please describe. I have a sensor with possible attribute values of dry, very_comfortable, comfortable, ok_but_humid, somewhat_uncomfortable, quite_uncomfortable, extremely_uncomfortable, severely_high, which is what is displayed in the info_entities area of room card. Instead I would like to display the more human readable friendly names without the underscores.

Have you tried if it is already a feature? Have you checked the wiki? yes

Describe the solution you'd like option to make show_state to show friendly name

Describe alternatives you've considered n/a

Additional context currently the attribute is displayed (highlighted in purple) I would like to display the friendly name (highlighted in green) image

marcokreeft87 commented 1 year ago

friendly_name is an attribute so if you pass it like this

info_entities
  - entity: sensor.example
    attribute: friendly_name

That should give the result you want.

Could you please try this?

hugalafutro commented 1 year ago

Hi, I'm not sure if I use correct terms for what I want to achieve, using the snippet from your post instead of state I get the name of the sensor so I guess friendly_name is not what I was after image

marcokreeft87 commented 1 year ago

Ah you are right. Back to the drawing board

marcokreeft87 commented 1 year ago

Which sensor is this? I currently don't have this so I cant play with it.

hugalafutro commented 1 year ago

It's this hacs integration https://github.com/dolezsa/thermal_comfort

marcokreeft87 commented 1 year ago

Cool integration! I think its not possible yet, but I will try to figure out on how to do it.