Show all state attributes possible settings?

Under Developer tools, if I show an entities’ state attributes, like my door sensor, how can I find all the possible attributes SETTINGS? Like “logical_status: normal” what is the other possible status? If I open the door, it becomes “violated” which developer tools does not show. Is there a way to see ALL possible status variables? It would be nice if there were a “drop-down” set of choices I can set the variable to.

index: 1
physical_status: short
logical_status: normal
definition: burglar_entry_exit_1
area: 1
triggered_alarm: false
icon: mdi:alarm-bell
friendly_name: ElkM1 Front Door

1 Like

You apparently own an ELK M1 alarm panel. It comes with a manual that explains all of the M1’s zone states. If you don’t have the manual, you can download it from ELK’s web site.

Sensor and binary_sensor are read-only entities (so you can’t set the value of their state or attributes). The ELK M1 integration sets the values of the sensor entities it creates.

I think it was meant “if then” for automations and frontend.
But I do agree it would be a nice thing for the developers to provide.
The state of some sensors are easy enough to get.
Like the main state of a door sensor can be triggered be opening the door, so you know the two possible states are normal and violated, but some attributes are harder to trigger, like errors on a device.
My main example of the problem here is my fire alarm. I actually need to know what the state is for low battery to set a notification, but the fire alarm battery is rated to last 5 years, so I have to wait 5 years to get that state?

I know the answer to my elk issue. I’m asking in general. My question is: does home assistant know all possible value states. If it does then how do we access those values??? I suspect the answer is HA has no idea.

Here’s how I find that kind of information.

It can be found in one of two places:

  1. The integration’s source code (in Home Assistant’s Core GitHub repository)
  2. The source code of the integration’s underlying library.

For example, the ELK M1 integration’s source code is here. Likely places to find lists of possible values may be found in const.py, strings.py or, because we’re specifically interested in sensors, in sensor.py. A quick review of those three files doesn’t show what we want so we look at manifest.json to get the name of the integration’s underlying library which is specified in the requirements field.

It depends on a library called elkm1-lib so we google its location and it’s in the author’s GitHub repository where, once again, we examine the ‘usual suspects’ and discover what we want is in const.py.

Tell me which integration it uses and I can help you find the information you want to know.

Thanks taras. So these values are only in the author’s integration code?

This seems so fundamental a requirement to display these values.

Why isn’t this a feature? A drop down selection menu?

Hello home assistant gods??

It seems I have misunderstood your first post. I thought you wanted to know how to get the possible states of an entity’s attribute. However it appears that the topic’s title is a rhetorical question and what you are actually requesting is a new feature (i.e. Feature Request).

Yes and no.
Home Assistant have in its code most of the possible states for the integrations that are included in the core.
All the other integrations is a blind spot for HA, so there need to be some form or way to communicate this information fra the integration into HA.

No my question was is this info there? I didn’t know if I simply didn’t know how to access this in HA. But now I know it’s simply not a feature. I’ll post a feature request as you suggest, thanks.

It is not available to users in the current version.

In the places I explained above. There’s no current means of displaying all potential values of an attribute in the UI.

I didn’t suggest it; I thought your first post seemed more like a Feature Request than merely a question. Nevertheless, feel free to post it as a Feature Request.

Yeah, make the feaure request and post a link here, so I can vote for it. :smiley:
And remember to vote for it yourself too.

Voted!
And thanks! :slight_smile: