States developer tools improvements: refresh button and states timeline

I’m missing two simple features in Developer toolsStates that could make a great difference and would be so useful.
The first one is a REFRESH button. Actually the only way to reload state and attributes of the entity is to select another entity and select back the one you’re interested in. That’s so unhandy… A simple REFRESH button would be a GREAT addition with low effort.

The second one is to integrate a chart with states updates in time, the same screen you’re showing in the entity card, when you select from Settings → entities. Actually if you want to see if the states did change you have to go to entities and go back to developer tools to inspect attributes, that’s unhandy too.

I’ve prepared a simple example of what that screen could be because one image is better than 1000 words :slight_smile:

EDIT: yes, the section below is updating but it’s far less readable, no syntax highlighting and no monospace font. The section above is by far better. Even a simple refresh button would be appreciated :slight_smile:
EDIT 2: the states registry and timeline you could show there would be very useful if the states you’ll show will be the real states string, not translated or changed in any way, for a perfect developer point of view. Another great addition would be that if you click on a state there you’ll show a dialog with attributes values at that point in time (I remember they are there in DB…)

I think will be very usfeful!

1 Like

Can you explain why it would be useful?

Just curious because in the 2.5 years I’ve used Home Assistant, I have rarely ever used that facility to set an entity’s state. Mostly because if you change an entity’s state using Developer Tools > States, it’s not the same as using Developer Tools > Services. The value you set only lasts until the next restart.

So if you’re using it exclusively for some sort of experimentation purposes then fine but if you actually want the new state value to persist, you’ll need to use Developer Tools > Services.

I don’t have any objection to the Feature Request but making this facility seemingly more “useful” might mislead more people into believing the state they set here is permanent (it’s not).

1 Like

some info about the discussion that was born about this FR here: Redirecting...
My request originated as I (and with me many other) was using the upper part (the one in the screenshot) to query the current status and attributes of an entity, when doing automations, for example. To know the exact state string, etc.
Someone pointed out that to query entities it’s better to use the lower part as it’s automatically refreshing.
I admit I never used that as it was more a mess, graphically. But It makes perfect sense, to me, to use the upper part to query value of an entity as the attributes text is even highlighted and monospace, much better, more appealing. It would be wonderful if there was a refresh button or, even better, a “autoupdate” checkbox that enable automatic updates of state and attribute of the selected entity in the upper part. That was the meaning of my request.
I never used that part to set the state of an entity, to be honest, and I’m not planning to do that.
Furthermore would be so handy to have a timeline and states registry with real states string of the entity, so that you can see what was the real state of that entity in a certain point in time (and by clicking showing a dialog with attributes value at that time).
What do you think about?

I’ve never had a problem with it. However I do agree that if an attribute’s value is complex (such as the forecast attribute of a weather entity) then it isn’t presented optimally. I think the Attributes column could benefit from a better presentation format.

If it were presented in the same way it is in the upper portion, that would be appreciated. However, there may be limitations with the table’s code that makes it challenging for developers to make substantial UI improvements in the table.

I use that UI all the time and don’t really click on entities very much if I’m being honest. Usually only if I want to force a specific state change to test something. Most of the time when I find myself in that view I’m looking something up quickly. Clicking on it to move it up top is unnecessary unless the entity has exceedingly complex attributes and I need to figure out if something is blank or an empty array but that’s pretty rare.

Still I don’t really have a problem with the request. When I do click on an entity it seems like an improvement. If we are making a wishlist for this UI though I might suggest a cap on the height of rows in the table below. I have a one calendar entity with a ton of info in its attributes and its pretty annoying how much space it takes up. Since that one does have complex attributes if I actually do need to look at it I’m going to click on it to view it up top. There’s really no reason to show like 100 rows of text in a row in the table.

Seems that the “Refresh” button was implemented, right?
Using 2021.6.4.
image
What the implemented button does, is it just a reading of data from DB (i.e. w/o updating)?