Entity's attributes for All Card types* - The ability to easily add them as you add entity's values

In short. I’m more than a little frustrated with the fact that every time I add an integration, there’s values that I’d like to be able to use on the front end … or even in an automation or scripts, but this can be overcome by using templates. I’m hamstrung and I have the option of creating an entity in the config … and why?

Prime examples:

  • An integration with my car, the state value of whether or not the climate control is on or not as an attribute of the car’s ‘Range’ sensor - it shows up as true or false.
  • Similarly on that same integration, the individual door lock and window sensors are attributes to other entities.
  • Lights - attributes for a lot of lights include: brightness, color, wifi-signal, effect, effect list, software version, etc…

I love the fact that Home Assistant is helping out take care of some of the basics of by making sure you’ve got a light that’s on or off… and it helps. But the second you want to break out of the bubble and do something slightly different you’re in for a world of hurt creating a million extra (imho) unnecessary sensors to take care of things.

The way I see it, there are two options:
Ability to add entity’s attributes to the front end on more than just limited entity cards, or
ability to use template’s on the front end to give us access to entity’s attributes (and more).

I’ve seen on this forum in a few places that templates are not to come to Lovelace for whatever reason, so I guess that option’s ruled out.

Now to address the other option:
Custom components - I’ve worked with a few, all cause a lot of pain, I’ve burnt days trying to get one sensor to work where another one does with one varying levels of success. They don’t always play nicely with each other.

This already exists.

Did I miss something in an upgrade? :man_facepalming:

Lemme go look.

@tom_l After a thorough dig through the various card types you can use entity attributes, it seems like it’s limited to a small number of cards. It’s easier to list those that do support it (or support it properly from my testing - home assistant version: core-2021.11.5:
Deffo:

  • Entities
  • Entity
  • Entity-filter

Kinda:

  • Markdown (via template sorcery)
  • Picture elements - state label only…?

Here’s some scenarios as attached screenshots to support my argument.

Scenario 1: I want to use a conditional card to give me control of whether or not I turn climate control on or off.
So we create the card, add in attribute and get errors:

We edit the card and persevere, checking:


the result:

So to rule out custom integrations, we use a core integration:

… sadly the same result. Both cards are oblivious to the attribute.

After scanning through other cards there may be useful use cases for, I pick on the picture-glance card - where it mentions it should be able to handle attributes of entities: Thinking it may be nice to be able to show battery percentage (it’s an attribute on the camera entity), person-motion detection (yup, an attribute on the camera entity) … and well, here’s the sad result of it not working either, despite it saying it should (I’m about to do an upgrade and hope nothing breaks to see if this will resolve things).

And to showcase the entity card does indeed work with attributes:

The fact that entity-related cards do support it goes some-way to answering, this, so I’ll update the original post to refer to more cards than just entities (that aren’t relating to styling & it makes sense).

If I’ve missed something, let me know, cause I feel like this is something I bang my head up against often! I really feel like this is something that should be core rather than a custom-component or a ‘work-around’.

Really see the same point specially because i love to do most of the stuff using ui.
It might be just an easy one to add entities attributes via UI either by specifying entity.attribute or as a separate field.
Think this would ease up the whole process by a lot.
Same story for automations it might be handy to not have to build template sensors but use the dot-notation and get going.

1 Like