In this tutorial, we’ll discuss what is ESPHome, how it works, and what it runs on. You’ll learn how ESPHome turns a short YAML file into real ESP32 firmware, what the generated C++ code and the compiled binary look like, how an ESPHome device talks to Home Assistant, and which microcontrollers ESPHome supports in its current release.
We’ll answer the question most new users have: what’s the difference between ESPHome and Home Assistant, and what runs on the chip? I compiled the same configuration on an ESP32-S3, an ESP32 DevKit V1, and an ESP32-C6, with both the ESP-IDF and the Arduino framework, and you’ll see the real compiler output and the flash and RAM numbers for each. Without further ado, let’s get right into it!
Note: All configurations in this tutorial are tested with ESPHome 2026.11.1 (ESP-IDF 5.5.6 framework) on the ESP32-S3-DevKitC-1, and compiled for the ESP32 DevKit V1 (ESP32-WROOM-32), and the WeAct ESP32-C6 Mini.
What Is ESPHome (ESP32 YAML Example)
ESPHome is a free, open-source firmware generator for microcontrollers. You describe a device in a YAML configuration file (the board, Wi-Fi, and the sensors, switches, or displays attached to it), and ESPHome validates it, generates a C++ project from it, compiles it with the chip’s own toolchain, and flashes the result. The device then runs on its own and reports to Home Assistant over your local network. ESPHome is a project of the Open Home Foundation.
ESPHome YAML configuration example (ESP32-S3)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
esphome: name: deepblue-s3-idf friendly_name: DeepBlue S3 idf esp32: variant: esp32s3 flash_size: 8MB framework: type: esp-idf logger: api: encryption: key: !secret api_key ota: - platform: esphome encryption: wifi: ssid: !secret wifi_ssid password: !secret wifi_password binary_sensor: - platform: gpio name: "BOOT Button" pin: number: GPIO0 inverted: true mode: input: true pullup: true sensor: - platform: internal_temperature name: "Chip Temperature" - platform: wifi_signal name: "WiFi Signal" update_interval: 60s - platform: uptime name: "Uptime" |
secrets.yaml (placeholders)
|
1 2 3 4 |
# secrets.yaml (keep it next to your configuration, never share it) wifi_ssid: "YourWiFiName" wifi_password: "YourPassword" api_key: "YourBase64EncryptionKey=" # 32-byte key, the Device Builder generates one for you |
These 42 lines compile into a 727KB firmware that uses 99,315 bytes of RAM on the ESP32-S3, with Wi-Fi, an encrypted Home Assistant connection, wireless updates, a button input, and three sensors. No C++ is written by hand. The rest of this tutorial shows you how to install ESPHome and flash this example step by step, then explains how the build works, what’s inside it, and which chips ESPHome runs on.
ESPHome Explained
ESPHome is a firmware generator, not a program that runs on the chip. It runs on your computer or on your Home Assistant server, reads your YAML, and produces a complete firmware image for one device. What runs on the ESP32 afterwards is ordinary compiled C++: ESPHome’s component library plus the code it generated from your configuration.
This is the difference between the two names:
- ESPHome builds and flashes firmware for microcontrollers (ESP32, ESP8266, RP2040, nRF52, Beken and Realtek chips).
- Home Assistant is the smart home server (usually on a Raspberry Pi or a mini PC) that collects data from many devices, runs automations, and shows the dashboard. An ESP32 cannot run Home Assistant.
- The ESPHome integration in Home Assistant connects to ESPHome devices, and the ESPHome Device Builder is the web interface (a Home Assistant app, a desktop app, or a Docker container) where you write the YAML and press Install.
ESPHome is free. Its Python code (the generator) is MIT-licensed and its C++ runtime is GPLv3, per the project’s license file. It is run by the Open Home Foundation, the non-profit that also owns Home Assistant, and it has two full-time developers funded by Home Assistant hardware sales and Home Assistant Cloud subscriptions, per the ESPHome 2026.1 release notes. A new version comes out every month.
ESPHome also differs from ready-made firmware such as Tasmota or WLED: those are one prebuilt binary that you configure after flashing, while ESPHome compiles a new binary for every configuration. That’s why an ESPHome device carries only the code it needs, and why every change means a new compile and an update.
How to Use ESPHome: Install, Compile, and Flash (Step by Step)
To see ESPHome work end to end, follow these steps on a Windows PC: install Python, install ESPHome in its own virtual environment, write the configuration from the example above, compile it, and flash it to an ESP32-S3 board over USB. At the end, the board boots ESPHome, joins your Wi-Fi network, and waits for Home Assistant. These are the exact steps and the real output from my PC and my ESP32-S3-DevKitC-1.
Note: ESPHome needs Python 3.11, 3.12, or 3.13. Python 3.14 is not supported yet, so install 3.13 next to any newer Python you already have.
#1
Download the Windows 64-bit installer of Python 3.13 from python.org, run it, and click Customize installation.

#2
Keep the default optional features and click Next. On Advanced Options, set the install folder (mine is H:\PR\Python313) and leave Add Python to environment variables unticked, so your default Python stays as it is. Click Install.

The installer ends with Setup was successful:

#3
Open PowerShell, create a virtual environment for ESPHome, install ESPHome into it, and tell ESPHome where to keep its ESP-IDF toolchain with the ESPHOME_ESP_IDF_PREFIX user variable (a short path avoids the Windows path-length limit).
|
1 2 3 4 |
H:\PR\Python313\python.exe -m venv H:\esphome\venv H:\esphome\venv\Scripts\python.exe -m pip install --upgrade pip esphome [Environment]::SetEnvironmentVariable('ESPHOME_ESP_IDF_PREFIX', 'H:\ehidf', 'User') H:\esphome\venv\Scripts\esphome.exe version |
The last command must print the ESPHome version (2026.11.1 here). Close and reopen PowerShell after setting the variable, so new windows see it.
#4
Create a project folder, save the YAML from the ESPHome YAML example above as s3-idf.yaml, and save secrets.yaml next to it with your Wi-Fi name, password, and a new API key ( openssl rand -base64 32 or any 32 random bytes in Base64).
|
1 2 3 4 |
mkdir H:\esphome\projects\what-is-esphome cd H:\esphome\projects\what-is-esphome notepad s3-idf.yaml notepad secrets.yaml |
#5
Validate the configuration. ESPHome checks every option and prints the full configuration with all the defaults filled in. It must end with INFO Configuration is valid!
|
1 |
H:\esphome\venv\Scripts\esphome.exe config s3-idf.yaml |
#6
Compile the firmware. The first compile downloads ESPHome’s ESP-IDF (about 2.5GB, around six minutes on my connection); later builds of this configuration take about one minute. It ends with the RAM and flash summary explained in ESPHome Compile Output and INFO Successfully compiled program.
|
1 |
H:\esphome\venv\Scripts\esphome.exe compile s3-idf.yaml |
#7
Connect the board’s USB port (the ESP32-S3’s native USB, not the COM / UART port) to your PC with a data cable, and note the new USB Serial Device (COMx) in Device Manager under Ports. If the board runs other firmware, hold BOOT, press and release RST, then release BOOT to put it in download mode first.
#8
Upload the firmware with esphome run and your COM port (mine is COM22). It compiles if anything changed, flashes the board, verifies the data, and resets the chip.
|
1 |
H:\esphome\venv\Scripts\esphome.exe run s3-idf.yaml --device COM22 |
Without --no-logs, esphome run keeps the port open and streams the device’s logs after the upload. Press Ctrl+C to stop them. The ESPHome logger tutorial explains the log levels and how to read the logs over Wi-Fi.
End Result: ESPHome First Boot on the ESP32-S3 (Serial Log)

This is the real hardware testing result on my ESP32-S3-DevKitC-1 (N8R2) right after Step #8: the serial output of its first boot. ESP-IDF’s second-stage bootloader reads the partition table ESPHome generated, with the two 3.75MB app slots ( app0 at 0x10000 and app1 at 0x3D0000), and loads the app. ESPHome then runs setup() for every component in about 60ms:
Next, each component prints its configuration, and the board joins the Wi-Fi network. The OTA server listens on port 3232 with encryption required, and the native API server listens on port 6053 with Noise encryption, ready for Home Assistant to connect:
The Wi-Fi name, IP address, and MAC addresses in these captures are replaced with placeholders. The api set Warning flag: waiting for client connection line is normal: the device keeps it until Home Assistant connects to the API.
How ESPHome Works: From YAML to Firmware
ESPHome works in four steps on the build machine (validate, generate C++, compile, link) and then flashes the firmware to the board, first over USB and later over Wi-Fi. This diagram shows the whole chain with the real numbers of the ESP32-S3 build above:

- Validate. esphome config checks every key, pin, and value against the schema of each component, and fills in every default you didn’t write. My 42-line file expands to about 170 lines: the logger’s baud rate and USB port, the Wi-Fi power-save mode, the sensors’ update intervals, units, and device classes. Mistakes stop here, before anything is compiled (for example, ESPHome 2026.11 rejects an all-zero API key, and it warns that GPIO0 is a strapping pin).
- Generate C++. ESPHome writes main.cpp and copies the source of only the components you used (21 folders here) into a full ESP-IDF project under .esphome/build/<name>/, with its own CMakeLists.txt, sdkconfig, and partitions.csv.
- Compile. The project is built by ESP-IDF’s own build system (cmake and ninja with GCC 14.2 for the S3’s Xtensa cores). Since ESPHome 2026.7 this native ESP-IDF build replaced PlatformIO for the ESP32. The first build downloads ESPHome’s private copy of ESP-IDF, about 2.5GB on my PC.
- Link and package. The result is firmware.factory.bin (bootloader, partition table, and app, for the first flash over USB) and firmware.ota.bin (the app alone, for wireless updates).
- Flash and run. The first flash goes over USB, from the Device Builder, from ESPHome Web in Chrome or Edge, or with esphome run. After that, every update goes over Wi-Fi (OTA). The device connects to Home Assistant through the native API.
ESPHome Generated C++ Code (main.cpp)
ESPHome turns each YAML block into one C++ object, sets its options, and registers it with the application. This is the part of the generated main.cpp (389 lines) that comes from the button and the temperature sensor of the example above:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
new(gpio_gpiobinarysensor_id) gpio::GPIOBinarySensor(); gpio_gpiobinarysensor_id->set_trigger_on_initial_state(false); App.register_binary_sensor(gpio_gpiobinarysensor_id, ESPHOME_PSTR("BOOT Button"), 638372800, 0); App.register_component_(gpio_gpiobinarysensor_id, 9); new(esp32_esp32internalgpiopin_id) esp32::ESP32InternalGPIOPin(); esp32_esp32internalgpiopin_id->set_pin(::GPIO_NUM_0); esp32_esp32internalgpiopin_id->set_inverted(true); esp32_esp32internalgpiopin_id->set_drive_strength(::GPIO_DRIVE_CAP_2); esp32_esp32internalgpiopin_id->set_flags((gpio::Flags::FLAG_INPUT | gpio::Flags::FLAG_PULLUP)); gpio_gpiobinarysensor_id->set_pin(esp32_esp32internalgpiopin_id); gpio_gpiobinarysensor_id->set_interrupt_type(gpio::INTERRUPT_ANY_EDGE); new(internal_temperature_internaltemperaturesensor_id) internal_temperature::InternalTemperatureSensor(); internal_temperature_internaltemperaturesensor_id->set_state_class(sensor::STATE_CLASS_MEASUREMENT); internal_temperature_internaltemperaturesensor_id->set_accuracy_decimals(1); App.register_sensor(internal_temperature_internaltemperaturesensor_id, ESPHOME_PSTR("Chip Temperature"), 356193340, 134217985); internal_temperature_internaltemperaturesensor_id->set_update_interval(60000); App.register_component_(internal_temperature_internaltemperaturesensor_id, 10); App.setup(); } void loop() { App.loop(); } |
You can read the YAML straight out of it: number: GPIO0, inverted: true, and pullup: true became set_pin(), set_inverted(), and FLAG_PULLUP, and the default 60-second update interval became set_update_interval(60000). The objects are placed in static memory, not allocated on the heap, so the RAM they use is fixed at compile time. The Arduino-style setup() and loop() are still there: App.loop() calls every component’s own loop in turn, which is how ESPHome runs many sensors without you writing a scheduler.
Note: The generated main.cpp contains your Wi-Fi name and password in plain text, and the API encryption key as a byte array. The compiled .bin carries them too. Treat the .esphome folder and any firmware file like your secrets.yaml: never post them online. The ESPHome YAML tutorial lists what secrets.yaml protects and what it doesn’t.
ESPHome Compile Output: Flash and RAM on the ESP32-S3
At the end of every build, ESPHome prints how much RAM and flash the firmware uses. This is the real output of the ESP32-S3 build from Step #6:
The table comes from ESP-IDF’s size tool: Flash Code (544,820 bytes) is the program itself, Flash Data (111,304 bytes) holds constants and strings, and DIRAM is the internal RAM taken at boot by code that must run from RAM ( .text), zero-initialized variables ( .bss), and initialized variables ( .data). The rest of the RAM is free for the heap, which Wi-Fi and the API connection use at run time.
The firmware uses 99,315 bytes of the S3’s 341,760 bytes of internal data RAM (29.1%) for static data and code placed in RAM, and 744,903 bytes of flash (18.9%). The flash total is the size of one app partition, not the whole 8MB chip: ESPHome splits the flash into two app slots ( app0 and app1) so an OTA update can be written into the free slot while the old firmware keeps running, and it switches over only after a complete, verified download.
ESPHome ESP-IDF vs Arduino Framework
ESPHome builds ESP32 firmware with ESP-IDF, Espressif’s official framework, by default since version 2026.1. The Arduino framework is still available for the ESP32, ESP32-C3, ESP32-S2, and ESP32-S3, but it no longer replaces ESP-IDF: since 2026.1 the Arduino core is pulled in as an ESP-IDF component on top of it. In my build, ESPHome fetched espressif/arduino-esp32 version 3.3.12, the same core the Arduino IDE uses.
To compare them, I compiled the same configuration with only the framework line changed:
|
1 2 3 4 5 |
esp32: variant: esp32s3 flash_size: 8MB framework: type: arduino # default: esp-idf |
| ESP32-S3 (Same YAML) | ESP-IDF 5.5.6 | Arduino (arduino-esp32 3.3.12) |
|---|---|---|
| Flash used | 744,903 bytes | 813,163 bytes (+68,260) |
| RAM used | 99,315 bytes | 98,955 bytes |
| Clean build time (my PC) | 59 seconds | 3 minutes 24 seconds |
| Default since | ESPHome 2026.1 | Was the default before 2026.1 |
| Chips | All ESP32 variants | ESP32, C3, S2, S3 only |
The Arduino build is 67KB larger in flash for exactly the same device, because the Arduino core’s own libraries are linked in on top of ESP-IDF, while RAM stays almost the same. It also takes more than three times longer to build from clean, because the whole Arduino core is compiled as one more ESP-IDF component (1,155 build steps instead of about 990). Stay on ESP-IDF unless a component or external library you need only works with Arduino. Newer chips such as the ESP32-C6, C5, H2, and P4 are ESP-IDF only.
The same configuration on the other two boards, both with ESP-IDF:
| Board (Chip) | RAM Used | Flash Used (of One App Slot) |
|---|---|---|
| ESP32-S3-DevKitC-1 N8R2 (ESP32-S3) | 99,315 of 341,760 bytes (29.1%) | 744,903 bytes (18.9%) |
| ESP32 DevKit V1 (ESP32-WROOM-32) | 44,160 of 180,736 bytes (24.4%) | 746,875 bytes (40.7%) |
| WeAct ESP32-C6 Mini (ESP32-C6) | 141,416 of 452,112 bytes (31.3%) | 848,764 bytes (46.3%) |
The classic ESP32 reports less RAM because ESP-IDF counts its RAM regions differently on that chip, so compare each board against its own total, not across chips. All three leave more than half of the app slot free for more components. On the C6, the first build also downloaded the RISC-V toolchain ( riscv32-esp-elf), because its CPU core is RISC-V instead of Xtensa.
ESPHome and Home Assistant: How They Talk
An ESPHome device talks to Home Assistant through the native API: a direct TCP connection on port 6053, with messages encoded as protocol buffers and encrypted with the Noise protocol using the 32-byte key from your secrets.yaml. Home Assistant finds the device on the network by mDNS, you enter the key once, and every sensor, switch, and button in the YAML appears as an entity.
- Push, not polling: the device sends a new value the moment it changes, and Home Assistant sends commands (turn the relay on) the same way. Everything stays on your local network, with no cloud.
- Encryption is required: ESPHome 2026.1 removed the old API password, so the encryption key is the only way to secure the connection, per the native API documentation.
- OTA updates use a separate port (3232 in the generated code), and since 2026.9 they are encrypted with the same key. The ESPHome Encryption Key and OTA tutorial shows how to set it up and change it.
- Without Home Assistant: ESPHome also offers MQTT, a built-in web server, and an HTTP request component, so a device can work with Node-RED, another MQTT broker, or on its own (see the ESPHome MQTT tutorial).
Home Assistant must run on a separate machine: a Raspberry Pi, a mini PC, a Home Assistant Green, or a virtual machine. The ESPHome Device Builder can be installed there as a Home Assistant app (Settings > Apps), so the same server builds and updates all your ESPHome devices. To set this up on the PC you already have, see ESPHome Device Builder on Windows: Home Assistant in VirtualBox with the Device Builder app, step by step.
ESPHome Terms Explained
These are the ESPHome terms used throughout the docs, the forums, and the rest of this ESPHome tutorial series:
| Term | What It Means |
|---|---|
| Configuration | The YAML file (plus any included files) that describes one device. One device, one configuration. |
| Component | A top-level block such as wifi:, api:, i2c:, or sensor:. Each one maps to a C++ class in ESPHome’s library. |
| Platform | The implementation inside a component, chosen with platform:: a sensor with platform: bme280_i2c or platform: wifi_signal. The word also names the chip family (esp32:, esp8266:, rp2:). |
| Entity | One value or control that Home Assistant sees: a sensor reading, a switch, a button, a light. |
| Native API | ESPHome’s encrypted TCP link to Home Assistant (port 6053). |
| OTA | Over-the-air update: uploading new firmware over Wi-Fi instead of USB. |
| Device Builder | The web interface where you create, edit, compile, and install configurations. It replaced the old ESPHome dashboard in 2026.6. |
| ESPHome Web | A web page (web.esphome.io) that flashes a board from Chrome or Edge over USB, with nothing installed. |
| Lambda | A few lines of C++ inside the YAML (lambda: |-) for logic the YAML options can’t express. |
| External components | Components loaded from GitHub or a local folder (external_components:), for parts ESPHome doesn’t support yet. |
| Packages | Reusable YAML pieces merged into a configuration (packages:), for example a common Wi-Fi and API block for all devices. |
| Substitutions | Variables in the YAML (${name}) so one file can serve several devices. |
| secrets.yaml | A separate file for passwords and keys, referenced with !secret, so you can share a configuration without them. |
What ESPHome Runs On: Supported Microcontrollers
ESPHome 2026.11 supports the ESP32 family, the ESP8266, the Raspberry Pi RP2040 and RP2350, Nordic nRF52, and the Beken, Realtek, and Lightning chips found in many off-the-shelf smart plugs (through LibreTiny), per the ESPHome components list and the ESP32 platform page. To pick a board for your project, see the ESPHome boards guide.
| Platform (YAML Key) | Chips | Notes |
|---|---|---|
ESP32 (esp32:) | ESP32, ESP32-S2, ESP32-S3, ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6, ESP32-C61, ESP32-H2, ESP32-P4, ESP32-S31, ESP32-H4, ESP32-H21 | ESP-IDF by default; Arduino on ESP32, C3, S2, S3. The S31, H4, and H21 need ESP-IDF 6.1. The best-supported family |
ESP8266 (esp8266:) | ESP8266, ESP8285 | Arduino ESP8266 core 3.1.2, native build since 2026.10. Wi-Fi only, tight on RAM |
RP2 (rp2:) | RP2040, RP2350 (Raspberry Pi Pico W, Pico 2 W) | Renamed from rp2040: in 2026.7 |
nRF52 (nrf52:) | nRF52840 and related | Native nRF Connect SDK build since 2026.7, Bluetooth LE devices |
LibreTiny (bk72xx:, rtl87xx:, ln882x:) | Beken BK72xx, Realtek RTL87xx, Lightning LN882x | The chips inside many Tuya-based plugs and bulbs, used to replace their cloud firmware |
Host (host:) | Your Linux or macOS computer | For testing configurations without hardware; Windows host builds are no longer supported since 2026.10 |
For a new project, an ESP32-S3 board is the safest choice: it has the RAM and PSRAM that voice, camera, and display projects need, native USB, and both frameworks (the ESPHome voice assistant tutorial runs on one). The ESP32-C6 adds Thread and Zigbee radios, and the classic ESP32 is fine for simple sensors. Pinouts for the boards used here: ESP32 DevKit V1 pinout, Waveshare ESP32-S3-Zero pinout, XIAO ESP32S3 pinout, and XIAO ESP32C6 pinout.
What Changed in ESPHome in 2026
ESPHome changed more in 2026 than in any year before, so many older tutorials and videos show tools and options that no longer exist. If a guide doesn’t match what you see, check it against this table:
| Version (Date) | What Changed | What Older Guides Show |
|---|---|---|
| 2026.1 (Jan 21) | ESP-IDF is the default ESP32 framework; Arduino runs as an ESP-IDF component; API password removed; OTA authentication uses SHA256 | framework: arduino by default, api: password: |
| 2026.6 (Jun 17) | ESPHome Device Builder 1.0 replaces the old dashboard | The ESPHome dashboard |
| 2026.7 (Jul 15) | Native ESP-IDF build instead of PlatformIO for the ESP32 (toolchain: platformio is deprecated, removed in 2027.2); native nRF52 build; rp2040: becomes rp2:; old dashboard removed | PlatformIO compiling ESP32 firmware |
| Aug 2026 | ESPHome desktop app for Windows, macOS, and Linux; the ESPHome Starter Kit (ESP32-C6 based) | Command-line or Docker-only installs on a PC |
| 2026.9 (Sep 16) | Encrypted OTA updates (Noise, reusing the API key); unencrypted OTA to be removed in 2027.3 | OTA password only |
| 2026.10 (Oct 21) | Native ESP8266 build; ESP-IDF builds call cmake and ninja directly; compressed OTA uploads | PlatformIO for ESP8266 |
| 2026.11 (Nov 18) | Minimum ESP-IDF 5.1; automations compiled to plain C++; OTA falls back to UDP on lossy links; experimental Thread border router on ESP32 |
Home Assistant also renamed its add-ons to apps, so the Device Builder is now found under Settings > Apps. The sources are the release notes for 2026.1, 2026.6, 2026.7, 2026.9, 2026.10, and 2026.11.
When to Use ESPHome, and When Not
Use ESPHome when you want a custom device that shows up in Home Assistant with as little code as possible. Write your own firmware (Arduino or ESP-IDF) when the device must do something ESPHome’s components don’t cover, needs exact timing, or must run without Wi-Fi and Home Assistant altogether.
| ESPHome | Tasmota | WLED | Arduino / ESP-IDF Code | |
|---|---|---|---|---|
| What you flash | Firmware compiled from your YAML | One prebuilt firmware, configured in its web page | One prebuilt firmware for LED strips | Your own program |
| Code needed | None (YAML), C++ lambdas optional | None | None | All of it |
| Home Assistant | Native API, auto-discovery | MQTT or its own integration | Its own integration | You write it (MQTT, HTTP) |
| Best for | Custom sensors, relays, displays, Bluetooth proxies, voice | Off-the-shelf plugs and switches | Addressable LEDs | Anything, with full control |
| Change a setting | Edit YAML, recompile, OTA | Web page, no compile | Web page, no compile | Edit code, recompile, upload |
If you already write Arduino code for the ESP32, ESPHome isn’t a replacement for it but a shortcut for the Home Assistant part. Many readers keep both: ESPHome for house sensors and the Arduino core for ESP32 for projects with custom logic, as covered in my ESP32 tutorials.
ESPHome Build Errors and Warnings (From This Build)
The all-zeros key is reserved and provides no protection
ESPHome 2026.11 refuses an API key made of zero bytes ( AAAA...A=), which some guides use as an example. Generate a real one with openssl rand -base64 32, let the Device Builder create it, or leave key: out to provision it at run time.
WARNING GPIO0 is a strapping pin and should only be used for I/O with care
GPIO0 selects the boot mode on the ESP32 and ESP32-S3 (GPIO9 on the ESP32-C6). Reading the BOOT button on it is fine, because the button only pulls it low when pressed. Don’t connect a sensor or an external pull-down to a strapping pin, or the board may not boot.
Failed to connect to ESP32-S3: No serial data received
This is the error I got on the first upload over the S3’s native USB port. The board still ran its previous firmware, which presented the port as a plain USB serial device (USB ID 303A:4001), so esptool couldn’t reset the chip into download mode. Hold the BOOT button, press and release RST, then release BOOT, and upload again: the port comes back as the chip’s own USB-Serial-JTAG device (303A:1001). Once ESPHome runs on the board, later uploads reset it automatically.
The first compile takes several minutes and downloads gigabytes
The first ESP32 build downloads ESPHome’s own ESP-IDF and toolchain (about 2.5GB here, plus the RISC-V toolchain for C-series chips). Later builds reuse it; a clean rebuild of the S3 configuration took about one minute on my PC.
ESPHome FAQ
Is ESPHome free?
Yes. ESPHome is free and open source: its Python code is MIT-licensed and its C++ runtime is GPLv3. There is no account, subscription, or cloud service involved.
Is ESPHome part of Home Assistant?
They are separate projects owned by the same non-profit, the Open Home Foundation. ESPHome builds the device firmware; Home Assistant connects to those devices through its ESPHome integration.
Does ESPHome need Home Assistant or the internet?
No to both. A device can use MQTT, its own web server, or no server at all, and the native API works entirely on your local network. The internet is needed only to download ESPHome and its toolchains for the first build.
Can an ESP32 run Home Assistant?
No. Home Assistant needs a full computer such as a Raspberry Pi 4 or 5, a mini PC, or a virtual machine. The ESP32 runs the ESPHome firmware and reports to it.
Is ESPHome Wi-Fi or Zigbee?
Mainly Wi-Fi, plus Ethernet and Bluetooth on the ESP32. On chips with an 802.15.4 radio (ESP32-C6, C5, H2), ESPHome also supports Thread, and the 2026.11 release added an experimental Thread border router.
Can ESPHome run on a Raspberry Pi Pico?
Yes, on the Pico W and Pico 2 W (RP2040 and RP2350) through the rp2: platform. A Pico without the W has no Wi-Fi, so it can’t reach Home Assistant on its own.
ESPHome Getting Started Series
This tutorial is the first part of our ESPHome Getting Started series:
| Part | Tutorial | What You’ll Learn |
|---|---|---|
| 1 | What Is ESPHome? How YAML Becomes ESP32 Firmware (this tutorial) | How ESPHome turns YAML into ESP32 firmware, ESP-IDF vs Arduino, supported chips |
| 2 | ESPHome Device Builder on Windows: Home Assistant in VirtualBox | Home Assistant OS in VirtualBox, the Device Builder app, OTA updates, backup |
| 3 | Home Assistant Raspberry Pi 5 Setup | Home Assistant OS on a 24/7 Raspberry Pi 5, the Device Builder, backups |
| 4 | ESP32 Home Assistant Setup with ESPHome Web | Flash a new ESP32 from the browser, add it to Home Assistant, first OTA update |
Wrap Up
To conclude this tutorial, ESPHome is a firmware generator: it validates your YAML, generates a C++ project, compiles it with ESP-IDF (or the Arduino core on top of it), and flashes a binary that connects to Home Assistant over an encrypted local API. We’ve seen the real generated code and the flash and RAM numbers on an ESP32-S3, an ESP32, and an ESP32-C6, the cost of the Arduino framework, the chips ESPHome supports, and what changed in the 2026 releases. Next, install Home Assistant and the Device Builder with ESPHome Device Builder on Windows.
In part 2, we’ll run Home Assistant and the ESPHome Device Builder on a Windows PC; then we’ll set up Home Assistant on an always-on Raspberry Pi 5 and flash a first ESPHome device from the browser. Later tutorials build real sensors, displays, and Bluetooth proxies on the same ESP32-S3.