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
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
6 Likes