How to use the file
Install ESPHome, either as the ESPHome Device Builder add-on in Home Assistant or with pip install esphome on your computer. Save the configuration with the name of the device, for example sensor-node.yaml, and put a secrets.yaml with your Wi-Fi name and password in the same folder.
Flash the board the first time over USB, with esphome run sensor-node.yaml or from the Device Builder. After that, updates go over Wi-Fi. Home Assistant discovers the device on the network and asks for the API encryption key, which is in the configuration.
Pins that can stop the board from booting
Some pins are read at reset to decide how the chip starts. On the ESP32 they are GPIO 0, 2, 5, 12 and 15; on the ESP8266, D3, D4 and D8. A sensor or a relay module that pulls one of them the wrong way at power-up can leave the board stuck. The generator marks these pins in the lists; the interactive ESP32 pinout explains each one.
Encrypted OTA updates
Since version 2026.9, ESPHome can encrypt over-the-air updates with the same key as the Home Assistant API, and it recommends this over the old OTA password. The generator uses encryption by default. If your ESPHome is older, choose the password option, or update ESPHome first.
Deep sleep on battery
With deep sleep the board wakes up, sends its readings and goes back to sleep. A static IP shortens the connection and saves energy at every wake-up. To estimate how long a battery lasts with your wake-up interval, use the ESP32 battery life calculator.
Frequently asked questions
Do I need Home Assistant to use ESPHome?
No. The API is for Home Assistant, but ESPHome also works on its own with the web page on port 80, or with MQTT. Without Home Assistant, you can turn off the API option and enable the web page.
Where do I put the Wi-Fi password?
In secrets.yaml, a separate file in the same folder as the configuration. The configuration only refers to it with !secret wifi_ssid and !secret wifi_password, so you can share the YAML without exposing your password.
What is the API encryption key for?
It encrypts the traffic between the device and Home Assistant. Home Assistant asks for it when you add the device. With encrypted OTA, the same key also protects firmware updates.
Why does ESPHome warn me about a strapping pin?
The chip reads strapping pins at reset to decide how to boot. Using them is allowed, but a circuit that pulls them the wrong way at power-up can stop the board from starting. Prefer other pins, or make sure nothing drives them during boot.
Which board should I choose for a generic ESP32 DevKit?
esp32dev works for most boards with an ESP32-WROOM-32 module, including the DevKitC and the 30-pin DOIT DevKit V1. Choose the C3 or S3 options only if the chip on your board is an ESP32-C3 or ESP32-S3.
Can I add more sensors later?
Yes. Edit the YAML in ESPHome and upload it again over Wi-Fi. You can also come back to this page: your settings and keys are saved in your browser.