ESPHome Devices are randomly switchin on/off

Hello @tomhaslett and welcome to the community! :wave:

I’m sure the post from @arufell (just before yours) has all the hints you need to work’a’round your troubles. Essentially the early_pin_init combined with your restore of choice should be everything you need :tada:

Feel free to leave your working yaml here for other lost souls :wink:

1 Like

So your problem is randomly rebooting esp or esp switching randomly relay off??

ESPHome reboots on purpose when something is not going right, e.g. wifi connection cannot be made or api connection is lost or mqtt connection is lost. So if you are facing this problem you’ll need to explicitly set the reboot_timeout option to 0s on the components being used.

1 Like