home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.75k stars 2.55k forks source link

History & Logbook do not conform to "last-changed" #20813

Closed ildar170975 closed 1 week ago

ildar170975 commented 2 weeks ago

Checklist

Describe the issue you are experiencing

There is a device_tracker. Here is it's current state:

изображение

Note that "last-changed" is "May 17, 2024 at 00:37:59". Same may be got by

изображение

But here is a History - and the state was not changed since 23:55:

изображение

Same with Logbook:

изображение

And same is shown by DB Browser:

изображение

The last change of a state was at same 23:55:

изображение

Now I wonder - why the last-changed value is shown differently?

Describe the behavior you expected

explained above

Steps to reproduce the issue

as above

What version of Home Assistant Core has the issue?

2024.5.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Chrome 124.0.6367.202

Which operating system are you using to run this browser?

Win10x64

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

ildar170975 commented 2 weeks ago

Since this could be a core issue - here it is: https://github.com/home-assistant/core/issues/117596

silamon commented 1 week ago

Did you restart Home Assistant at 00:37? Anyway this is not a frontend issue as it is show as it is being received from core.

ildar170975 commented 1 week ago

Did you restart Home Assistant at 00:37?

If you mean 17.05 00:37 - not. Uptime graph, no reboots: изображение

Anyway this is not a frontend issue

Well, the core issue was registered. No feedback))

silamon commented 1 week ago

Since it's a core issue, probably there's a reload of the state somewhere what causes the change to happen. We show the datetimes as how we receive them from core.

ildar170975 commented 1 week ago

Do you know what causes last-changed to be updated? Is it a "state was changed & it is different" event - or is it a "update of state is called" event? I mean - could the last-changed be updated even when a state is same?

silamon commented 1 week ago

A restart of Home Assistant forced the last-changed to be changed even when the state is the same. Probably there are also other ways that result in the same, like reloading parts of the configuration, but there are more knowledge people to find that out that read the core issue tracker.

ildar170975 commented 1 week ago

Thing is that there were no reboots / reloading integrations... Will keep observing.