Internal vs. readable state names

As far as I know, there can be two versions of each state. One that is used “under the hood” (the internal state name) and one that is used in the backend and frontend (the readable version).

For example: When I check the status of my robot lawn mower, I see something like “Searching for boundary wire”. But when I check the same state in the admin tools, it’s just “searching_wire”.

Now I have two questions.

1: Where can I see the internal version of each state? I want to use them for automations, but when I look at the history stats of an entity, I can only see the readable states. The only way for me to figure out what the internal name is is to wait until an entity has that state and then look it up in the admin tools. This is not very convenient.

2: When I want to create a notification that contains a state with ‘{{ states(“entity_name”)}}’, it’s always the internal name. How can I access the readable version of the state?

Thanks in advance!

Developers tools → states shows the internal states.

Use state_translated()

as far as I know there is no way to get that information except in the way you mentioned.

it’s the unintended consequence of making things “easier” by showing the translated state everywhere except the dev tools states list.

Some integrations show you all possible state options in the attribute column of the Dev tools. If your lawn mower integration does this, you will be able to see all possible options without requiring the mower to be in that particular state at that point in time: