Input Boolean Last Status (On / OFF) before Restart

Dear Home Assistant Community,

I would very much appreciate if you could give me a hint how to solve the following problem:

How can I set my Input Boolean Status on the “Last known Status” (On / OFF) before an automation executed an automatic restart/reboot of hass.io ?

Thanks so much for a hint!

how do you have your input booleans coded? do you have “initial: x” in your config for them?

if you do then they will always be in “x” state after restart. remove that line and they should keep the previous state.

Thanks so much! This Worked!!!