Retain switch states on a power failure

When you have different sensors beside the relay which update a lot, you indeed will have a lot more flash writes and then it will be usefull to set the flash_write_interval to 5 or more minutes minutes.

That why I wrote “using the device only as a switch”.

1 Like

I use ESPHome with a Beken/Tuya board:

bk72xx:
board: generic-bk7231t-qfn32-tuya

So its neither an ESP32 nor ESP8266 board.

Will the esphome restore mode flag work for this board?
Or what is the restore previous switch state for this Beken board?

After updates or power failure this Tuya board flashed with ESPHome stays off, while I want the switches to return to their previous state.

Thanks in advance for your assistance.