The "restore_from_flash" isn't working on my esp8266 board

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

observe also
restore_mode
option on your switch components
and be aware that default flash_write_interval is 1min.