Easier handling of attributes - why is it so difficult?

Hi,

One thing I can’t understand or find an answer to:
Why are entity attributes so difficult to use?
Why do I need to create a script in YAML so that I can use it? Why is it like that?

It would be easier if you could invoke them with e.g.
sensor_name.entity_name.attribute

Thanks for your understanding and reply.

You’ll have to provide a more specific example of your difficulty with attributes because they’re not nearly as challenging to use as you’ve claimed. For example, when creating a State Trigger using the Automation Editor, it displays the entity’s available attributes (Initial and Step for the entity shown below).

The State Condition offers the same convenience:

and to complement what was posted by Taras:

state_attr('climate.livingroom','temperature')

Is what you can use in your Yaml instead of the gui.

I would like get status of door in my car


and now i need to put into yaml:

  • platform: template
    sensors:
    entity_bmw:
    friendly_name: “BMW left front”
    value_template: “{{ state_attr(‘binary_sensor.318d_windows’, ‘leftFront’) }}”

Why write if theoretically you could only indicate an attribute.

Do you need to display the state of the door, or automate on it? Either way, you can do it quite simply without creating a new entity.

I need to change picture regarding to state of the door.

Do you mean in a card on your dashboard? Many (maybe all) cards let you show an attribute, and specify an icon.

Maybe I’m too stupid, but I don’t know how to do it.
How to display the status in the dashboard of an attribute?

One way is to use an Entity card.

Thanks, in Entity card is posible, but if I wanted to generate list of atributes? Then it’s better to use the Entities card, but you can’t point the attribute there (or I don’t know how).

I would like to use for example Gauge card with atribute of voltage or current at tablet battery:


That mean I must write some code for it? I cannot just select?

1 Like

The Entities card supports a wide array of options, too many to display all of them in visual mode so you have to switch to YAML mode (“Show Code Editor”). Here’s a screenshot from the documentation:

nah. ok, don’t display them by default, but do with some kind of “show attributes” button for those willing to take the risk of “too many to display”…

I’ve just been looking for how to display an attribute → got disappointed that I have to YAML for that.

We’re one year later and the UI remains uncluttered.

  • If you have the requisite skills to implement your proposal, submit a Pull Request in Home Assistant’s GitHub Frontend repository.

  • If you don’t, submit a Feature Request in the Frontend repo.

not yet - maybe someday. for now i stick to simple doc’s PRs, where I don’t need to make a build, tests, etc.

You mean this?

What is this then for?

The first is for Frontend feature requests (GitHub).
The second is for Core (backend) feature requests (community forum).