I am in the process of migrating to the Lovelace UI, but one of the things I would like to achieve is the view I had in the old UI:
When I use the same sensors in Lovelace they look like this:
How do I get the attribute to show up?
I am in the process of migrating to the Lovelace UI, but one of the things I would like to achieve is the view I had in the old UI:
When I use the same sensors in Lovelace they look like this:
How do I get the attribute to show up?
I’m using the secondary_info option for this kind of thing, might work for you as well:
- title: Charts
icon: mdi:chart-line
id: stats
cards:
- type: entities
title: Pump Plug Info (always on)
entities:
- entity: sensor.tp_link1_volts
secondary_info: last-changed
- entity: sensor.tp_link1_amps
secondary_info: last-changed
- entity: sensor.tp_link1_cwatts
secondary_info: last-changed
- entity: sensor.tp_link1_dwatts
secondary_info: last-changed
- entity: sensor.tp_link1_twatts
secondary_info: last-changed
But there’s also a custom entity-attributes-card:
Unfortunately not. I get mapping values are not allowed in this context
I can add that these are the available attributes for the three entities above:
{'code_format': '^\\d{4,6}$', 'changed_by': 'tomas', 'friendly_name': 'Hemlarm', 'custom_ui_state_card': 'state-card-custom-ui', 'extra_data_template': 'Senast ändrad av ${attributes.changed_by}'}
{'node_id': 19, 'value_index': 0, 'value_instance': 1, 'value_id': '72057594361675776', 'friendly_name': 'Entrédörr', 'device_class': 'door', 'custom_ui_state_card': 'state-card-custom-ui', 'show_last_changed': True}
{'friendly_name': 'Garageport', 'device_class': 'door', 'custom_ui_state_card': 'state-card-custom-ui', 'show_last_changed': True}
Can you post the config you’re trying to use, please.
Make sure you have two lines for each sensor, one starting with entity
and the other with secondary_info
Ah, I see my mistake now. I’ll try again.
Sorry for not reading, it works now!
Hm, it seems as if only ‘last-changed’ works. Trying the other attributes e.g. ‘changed_by/changed-by’ or ‘friendly_name’ shows nothing.
I never tried anything else than last-changed - which doesn’t show up as an attribute for any of my sensors BTW.
Ok thanks, I’ll settle for this now.
Does anyone know if @andrey has developed something like this for Lovelace similar to the one for Non-Lovelace HA?
Or is there some way to make that one work in Lovelace?
This can now be accomplished with the use of a custom Lovelace plugin. See the following post:
Is there a way of using official cards?
Is this supported or on the roadmap?
For example, Seventeentrack sensors have a bunch of useful information as secondary info. It seems ideal to have this supported natively.
no and no. i got it from the man himself in a feature request. It’s not going to happen.