I use a Sonoff 4CH Pro and changed the firmware to ESPHOME, and I need to when my device doesn’t get any power when the power is turned back on the state (in my case lights on) that it was previously.
There is what i did, however didn’t fix my problem, my device still initialize with the state “off”:
esp8266:
board: esp01_1m
restore_from_flash: True