Last changed/Last updated

Hi, inspired by this topic i made a python script for getting the real last_changed timestamp.
Maybe someone can use it.

I would like to see this restored upon startup as well. We have the history, not sure why it canā€™t be read into the state machine when HA is restarted.

Completely agree. Seems like an excellent feature to have
@rhodges, have you looked into how difficult this would be to implement?

Not yet. I was thinking of playing with AppDaemon first and see what I can do there.

I would like to add my support for the history timestamp to be restored upon a HASS restart. Because of other issues with serial devices just bombing occasionally, I have my HASS instance scheduled to restart every morning to prevent complications with not being able to communicate with those serial devices.

This makes the last_updated dates always off and makes some functionality in a React app Iā€™m writing useless.

1 Like

I know this is a very old thread, but I would love to see this implemented. Iā€™ve been building out a security use case and while there are workarounds to not having the state accurately recorded for a device, they are very manual and a bit tedious.

It been 2 year, we really hope this being implemented.
This just need to be loaded from DB when HASS started

I believe we already retain state after reboot why cant we get last_changed stat retained ?

Based on this, it is possible right ?

yes that would be nice indeed, and much wantedā€¦ Any news on this yet?

I back this also, i am constantly adding things to home assistant and restart it every few days so when everything is reset its annoying.

+1 here yes

This would be pretty useful, it annoys me how itā€™s currently setup. It doesnā€™t make sense to me as an end-user to see all my last-changed states refreshed when I restart HA. I want to see the last time it properly changed state not just became unavailable.

2 Likes

I am also looking forward to this feature!

Join here:

The architecture issue mentioned above is marked closed. Hope it is re-opened.

1 Like

As can be read, the change will only be considered when a Python expert prepares the necessary code for this. Since that wonā€™t be me (programming skills near absent), the issue is closed.

So there is no hope of this being implemented soon? I think I will try it with another userā€™s idea of making a datetime entity but I dont really want to clog up my entities with these. Maybe it can be a custom attributeā€¦

No hope. In all this time since the issue/topic was opened, (to my knowledge) only one user wrote some Python code, it worked partly for me. You could try it: https://github.com/home-assistant/architecture/issues/230#issuecomment-600484354

Another appeal to vote for the feature request to help on this: Retain last state change data of a sensor after reboot

Just stumbled upon this and Iā€™m really sad to head that this basic functionality is missing in Home Assistant. Coming from openHAB myself this seems like a rather big showstopper :frowning:

2 Likes

Paulus we need an option to populate last_changed state machine values from the history database. With the flourishing of the platform, and high frequency of updates, restarting Home Assistant is now a common and regular occurrence for most

5 Likes