Illustrated title card for the guide: ESPHome ESP-IDF 5.3+ Migration and Breaking Changes
setup

ESPHome ESP-IDF 5.3+ Migration and Breaking Changes

Switch an ESPHome ESP32 from Arduino to ESP-IDF, fix incompatible components, size OTA partitions, and decide when to flash over USB.

By ESPHome Guide Editorial · · 3 min read

To switch an ESPHome ESP32 from Arduino to ESP-IDF, set esp32.framework.type to esp-idf, clean the build files, and compile before uploading. Fix incompatible components first. If the new build needs a different partition layout, a serial flash can install it. ESPHome migration guide, ESPHome CLI

Switch the framework and compile

ESPHome 2026.1.0 made ESP-IDF the default framework for ESP32, ESP32-C3, ESP32-S2, and ESP32-S3, and bumped ESP-IDF to 5.5.2. Espressif introduced the app partition sizing rule separately in ESP-IDF 5.3. ESPHome 2026.1.0 release notes, Espressif’s 5.3 migration notes

Back up your working YAML. Edit the existing esp32: block and keep your board or variant setting. If you have an Arduino-specific framework.version pin, remove it to use ESPHome’s recommended ESP-IDF version. ESPHome migration guide, ESP32 framework settings

esp32:
  framework:
    type: esp-idf

Replace your-config.yaml with your node’s filename. These commands remove its build files, then validate the YAML and build fresh firmware. ESPHome CLI

esphome clean your-config.yaml
esphome compile your-config.yaml

Resolve incompatible components

If the compile flags an incompatible component, check its documentation and any alternative listed in the error. Use the changelog for the ESPHome release you build with. For example, ESPHome 2026.2.0 added ESP-IDF support to heatpumpir, which the 2026.1.0 notes had listed as Arduino-only. ESPHome migration guide, ESPHome 2026.1.0 release notes, ESPHome 2026.2.0 changelog

For a WS2812 strip on an ESP32 with RMT hardware, replace the fastled_clockless entry with esp32_rmt_led_strip. Use the existing data pin and LED count. Set channel_colors to the strip’s color order, shown here as GRB. FastLED Light, ESP32 RMT LED Strip

light:
  - platform: esp32_rmt_led_strip
    pin: GPIOXX
    num_leds: 30
    chipset: ws2812
    channel_colors: GRB
    name: "My Light"

Recompile with the replacement. If a required component still needs Arduino on your ESPHome release, set type: arduino explicitly in the same framework block, then clean and compile again. ESPHome migration guide

Size app partitions for OTA

ESPHome generates a partition table from esp32.flash_size by default. Set that value to the board’s actual flash capacity. Setting it higher than the hardware supports can prevent booting. If your configuration already has a custom CSV, review it under esp32.partitions. ESP32 platform settings

esp32:
  partitions: my_partitions.csv

In the custom CSV, check the Size column for every app row. The ESP-IDF 5.3 partition table generator requires app sizes to be multiples of 4 KB (0x1000 bytes). For layouts without Secure Boot V1, round an unaligned legacy size down to the previous 4 KB boundary. If Secure Boot V1 is enabled, app sizes must be aligned to 64 KB. Espressif’s 5.3 migration notes, ESP-IDF 5.5.2 partition table rules

Field or checkWorked example
App sizeA legacy size of 0x180800 rounds down to 0x180000.
App offsetA fixed start address must be a multiple of 0x10000. A blank offset lets the generator align it.
OTA firmware fitA hypothetical app image of 0x181000 bytes is 0x1000 bytes too large for a 0x180000-byte slot.

The numbers in the example illustrate the alignment and fit checks. Keep at least two OTA app slots, including subtypes ota_0 and ota_1, plus a data partition with subtype ota. Compare the size of firmware.ota.bin with each OTA app slot. ESP-IDF warns when an app binary fits only some app partitions and fails the build when the binary fits none. ESP-IDF partition size checks, ESP-IDF OTA process, ESPHome CLI

Adding optional data partitions to ESPHome’s generated layout reduces the app partition size. Recompile after changing the layout. ESPHome partition settings, ESPHome CLI

Choose serial flashing or OTA

A serial flash can install a changed partition table or bootloader with the application. After compiling, plug in the device and substitute its serial port for the example below. The serial factory image contains the bootloader, partition table, and application. ESPHome CLI

esphome upload your-config.yaml --device /dev/cu.SLAB_USBtoUART
esphome logs your-config.yaml --device /dev/cu.SLAB_USBtoUART

If the installed table and bootloader already suit the build, a regular OTA update writes the app to an existing OTA app slot that is not selected for booting. The installed layout still governs what fits. Use the OTA command if ESPHome OTA is already configured and the image fits the existing app slots. ESP-IDF OTA process, ESPHome CLI

esphome upload your-config.yaml --device OTA

ESPHome documents a separate OTA procedure for rewriting the partition table. It requires firmware already running with allow_partition_access: true. A reset or power loss during that procedure can leave the device needing serial recovery. Moving the NVS partition can also make its saved data unavailable. ESPHome OTA partition-table procedure

Evidence and limits. ESPHome’s 2026.11.1 documentation, its 2026.1.0 and 2026.2.0 release records, and Espressif’s ESP-IDF 5.3, 5.3.2, and 5.5.2 guides were checked on November 26, 2026. The commands and flashing steps were documented without a local build or device test.

Sources

  1. ESPHome ESP32 Arduino to ESP-IDF Migration Guide
  2. ESPHome 2026.1.0 release notes
  3. ESPHome ESP32 Platform
  4. ESPHome Command Line Interface
  5. ESPHome FastLED Light
  6. ESPHome ESP32 RMT LED Strip
  7. ESPHome 2026.2.0 changelog
  8. ESP-IDF 5.2 to 5.3 System Migration
  9. ESP-IDF 5.5.2 Partition Tables for ESP32
  10. ESP-IDF 5.3.2 OTA Updates for ESP32
  11. ESPHome OTA Updates

Related