Inconsistent time of most recent sensor change

I’m trying to debug why some entity turned unavailable.
Here is what GUI shows:

image

Not sure why someone decided that showing Last week is somehow helpful. OK, agree on such a format on general view. But why on-hover pop-up doesn’t show a precise time?

Let’s click “Show More”
Here is what I see:

Nothing, nada, none.
Not even speaking that history by default opens with a one-day interval, while it’s obvious I would like to examine the most last event.
But even after changing the range interval to 2 weeks - there is nothing to show.

It could be HA restart (which makes no sense to affect mentioned UI elements)… but how can I be sure about it since no exact time is shown.

How far back does your recorder extend, the default 10 days?

Because that’s all that is available to show.

So it looks like it has been unavailable for at least that long.

I believe it’s default.
But if there is no data for this sensor, how GUI can mention opposite?

10 days ago can be last week. The week starts on Sunday, or Monday.

Which doesn’t explain why GUI shows false (or misleading) information

I don’t see any misleading info in your screenshots.

The last state recorded is ten days ago, which was last week and the state was ‘unavailable’.

How can GUI know the time of last change of the sensed value, if there are no historical records for that?

The only possible way is that it shows a time of HA restart. If it’s true then I consider this information misleading, since I - as a user - expect to get the change time of the sensed value. No change of an attribute set by the system.

I would expect, the GUI to show the time of the last value change, or “not known” in case it’s really not known (is not in history).

The Logbook and History components use the the recorder to retrieve states. Your sensor has the state ‘unavailable’ for all values in the recorder as far back as it goes. The oldest one is 10 days ago. Hence the state changed to unavailable 10 days ago as far as it knows.

But it must not be true information (and usually it isn’t). What you say means, it assumes a lower boundary of recorded history as a state change? Then it’s even worse than I thought.
If I left a light turned on for a month, will it show “the last week” as state change?

Why?

It’s just reporting what it knows.

Also I just looked at one of my entities that has been unavailable for months. It reports the last restart I did as last_changed.

It doesn’t say state changed, it says the state has been unchanged to a week. Which is true.

Just like my batterylevel:
image

It doesn’t say the batterylevel is 83% now, it says 15 minutes ago it was 83%. It can only know things if things change, if things does not change it’s believed to be the same, and if your purge settings purge the data then it can’t possibly know anything.

It’s far-fetched, but off. “15 minutes ago” means “something happened 15 minutes ago”. Not, nothing changed since then. Otherwise, it would had been phrased differently

Ok.
Write a feature request to get the wording the way you want then if it’s really this hard to understand. (not being sarcastic)

If this is a problem then do it. I doubt it will pass though

No, I’m not gonna create FR for rephrasing it (it should be a bug report if your interpretation is true though). To me, it’s OK if it shows the value of the most recent sensor change (sensed value). It’s the only valuable information for the end-user.

I believed we are here to talk about user experience, but found you are arguing about stretching the interpretation of shown information to fit technical limitations. It wasn’t my intention. Those are 2 different things.