Question about usage #11
-
I was wondering if you could help me. I’m trying to save the state of a binary_sensor from my alarm panel and restore both the state and the last_modified and last_updated times. After a restart, the sensor is “unknown” until the door/window is actdually toggled and the modified/updated times are the restart time which is useless. But there is no service call to change the state of a binary sensor so how does the restore action of the saver component work? I started writing this and got stuck with how to implement the restore portion. I also looked through the saver code and don’t see anywhere that it would actually be able to update the last_modified and last_updated times of a state in the state machine. In my automations.yaml:
Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Saver technically doesn't restore anything, it just stores the state and provides a way to use it in a service call, so you can't do anything without an appropriate service. |
Beta Was this translation helpful? Give feedback.
Saver technically doesn't restore anything, it just stores the state and provides a way to use it in a service call, so you can't do anything without an appropriate service.