I’m searching how I can restore values for reboot. One of my projects I configured a temp start and stop for a heating project but if Hassio reboots it resets to the default/initial values that are in the config and no to the last values set in the console.
How can I solve this ?
If you set initial: bob
on anything, it will be in state bob
whenever homeassistant restarts.
If you remove the line initial: bob
on a component that supports restore_state, then it should remember what state it was last in when homeassistant restarts.
Sometimes it forgets and your things will be zero (or the first available option)
Hope this helps.
I use a persistence package to restore last_triggered
events for some automations.
It can be found here :
thanks I think this persistent stuff is what I need. Will test it tomorrow.
It seems strange to me that such a big automation engine does not support persistence for the input values and things people change in the UI. I get that the state of the devices connected should be obtained from the actual device but if the input is coming from the UI - why wouldn’t that be a part of the HA framework? Seems strange we have to hack around like this…
EDIT. Found this: https://github.com/gazoscalvertos/HASS-Persistence
Looks like a move in the right direction but for now it is WIP. Anyone aware of a plan for such feature?
EDIT 2: OK - was not aware that some of that is achieved by the recorder: https://www.home-assistant.io/components/recorder/ - wondering if it works for automations as well…