I want them to restore the state after restarting. It was working fine till yesterday but now it is not restoring its state. What could be the problem. I am using Esp01s modules with this.
I have the same problem - did you find a solution? I’ll do a working around defining a number where the last switch state is stored, if no solutiom is possible
I found the solution: Restore_state doesn’t work, even with turn_off /turn_on action. Waht works is “restore_mode: RESTORE_DEFAULT_OFF” - which is same with the GPIO-switches
I need a boolean toggle that keeps the value past a reboot. Switch Component — ESPHome RESTORE_DEFAULT_ON - Attempt to restore state and default to ON.
I get that it might not be able to restore, but in that case it should be on, but after unplugging the ESP and plugging it back in the switch is off.