123
(Taras)
2
The answer to your question is: You cannot prevent it.
It’s a long-requested feature (value of last_changed
survives a restart) but has never been implemented.
2019 Feature Request
2020 WTH
2022 WTH
The workaround is to store the value in an entity whose value is able to survive a restart (like Input Helpers and Trigger-based Template Sensors).
2 Likes