ESPHome e-paper: error while trying to install/deploy new yaml config for Waveshare 4.2

This is my .yaml


esphome:
  name: home-e-paper
  min_version: 2026.9.1
  friendly_name: Ekran

esp32:
  board: esp32dev
  framework:
    type: arduino
  
logger:

api:

ota:
  - platform: esphome

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: 192.168.8.38

  ap:
    ssid: "Dev4 Fallback Hotspot"
    password: "4rSWggamfl8M"

external_components:
  - source: github://pr#6209
    components: [ waveshare_epaper ]

spi:
  clk_pin: GPIO18
  mosi_pin: GPIO23

font:
  - file: "gfonts://Roboto"
    id: font_small
    size: 18
    glyphs: ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~°ĄĆĘŁŃÓŚŹŻąćęłńóśźż'

  - file: "gfonts://Roboto"
    id: font_large
    size: 30
    glyphs: ' 0123456789.-°C%W'

sensor:
  - platform: homeassistant
    entity_id: sensor.temp_parter_temperature
    id: indoor_temp

  - platform: homeassistant
    entity_id: sensor.temp_parter_humidity
    id: indoor_humidity

  - platform: homeassistant
    entity_id: sensor.temp_outdoor_temperature
    id: outdoor_temp

  - platform: homeassistant
    entity_id: sensor.temp_outdoor_humidity
    id: outdoor_humidity

  - platform: homeassistant
    entity_id: sensor.actual_power
    id: current_power

image:
  - platform: file
    file: "/config/esphome/images/totoro_100x84.bmp"
    id: totoro_bmp_100x84
    type: BINARY
    
display:
  - platform: waveshare_epaper
    id: epaperdisplay
    model: 4.20in-v2
    cs_pin: GPIO5
    dc_pin: GPIO17
    reset_pin: GPIO16
    busy_pin: GPIO4
    reset_duration: 2ms
    rotation: 180
    update_interval: 180s

    lambda: |-

     // widget:image id:w_mv2z74xhhplpx type:image x:526 y:294 w:100 h:100 path:"/config/esphome/images/totoro.bmp"
      it.image(10, 199, id(totoro_bmp_100x84));
      
      // Naglowek
      it.print(200, 8, id(font_small), TextAlign::TOP_CENTER,
               "Home");

      it.line(10, 36, 390, 36);

      // Naglowki kolumn
      it.print(100, 45, id(font_small), TextAlign::TOP_CENTER,
               "WEWNATRZ");
      it.print(300, 45, id(font_small), TextAlign::TOP_CENTER,
               "NA ZEWNATRZ");

      // Separator pionowy
      it.line(200, 36, 200, 165);

      // Temperatura wewnetrzna
      if (id(indoor_temp).has_state()) {
        it.printf(100, 75, id(font_large), TextAlign::TOP_CENTER,
                  "%.1f°C", id(indoor_temp).state);
      } else {
        it.print(100, 75, id(font_large), TextAlign::TOP_CENTER, "--.-°C");
      }

      // Wilgotnosc wewnetrzna
      if (id(indoor_humidity).has_state()) {
        it.printf(100, 120, id(font_small), TextAlign::TOP_CENTER,
                  "Wilg. %.0f%%", id(indoor_humidity).state);
      } else {
        it.print(100, 120, id(font_small), TextAlign::TOP_CENTER,
                 "Wilg. --%");
      }

      // Temperatura zewnetrzna
      if (id(outdoor_temp).has_state()) {
        it.printf(300, 75, id(font_large), TextAlign::TOP_CENTER,
                  "%.1f°C", id(outdoor_temp).state);
      } else {
        it.print(300, 75, id(font_large), TextAlign::TOP_CENTER, "--.-°C");
      }

      // Wilgotnosc zewnetrzna
      if (id(outdoor_humidity).has_state()) {
        it.printf(300, 120, id(font_small), TextAlign::TOP_CENTER,
                  "Wilg. %.0f%%", id(outdoor_humidity).state);
      } else {
        it.print(300, 120, id(font_small), TextAlign::TOP_CENTER,
                 "Wilg. --%");
      }

      // Linia oddzielajaca sekcje mocy
      it.line(10, 165, 390, 165);

      it.print(200, 178, id(font_small), TextAlign::TOP_CENTER,
               "AKTUALNY POBOR MOCY");

      if (id(current_power).has_state()) {
        it.printf(200, 207, id(font_large), TextAlign::TOP_CENTER,
                  "%.0f W", id(current_power).state);
      } else {
        it.print(200, 207, id(font_large), TextAlign::TOP_CENTER, "-- W");
      }

Deployment was working before the update to the new version of ESPHome to 2026.9.1

Getting this error now:

*** building configuration bundle for remote build ***
INFO ESPHome 2026.9.1
INFO Reading configuration /config/esphome/esphome-web-010880.yaml...
INFO Skipping update for https://github.com/esphome/esphome.git@pull/6209/head, will refresh on the next run after 23h 39min (refresh: 1d); use refresh: always to update now
INFO External components are overriding built-in components:
  source: https://github.com/esphome/esphome.git@pull/6209/head
  components: waveshare_epaper
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq/#why-am-i-getting-a-warning-about-strapping-pins
4.20in-v2
WARNING WiFi AP is configured but neither captive_portal nor web_server is enabled. The AP will not be usable for configuration or monitoring. Add 'captive_portal:' or 'web_server:' to your configuration.
WARNING Bundle contains secrets (e.g. Wi-Fi passwords). Do not share it with untrusted parties.
INFO Bundle created: /tmp/tmp2gxs59sv.tar.gz (3 files, 1.8 KB)
*** bundle ready (2 KiB); sending to build server ***
INFO ESPHome 2026.9.1
INFO Reading configuration /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/esphome-web-010880/esphome-web-010880.yaml...
INFO Skipping update for https://github.com/esphome/esphome.git@pull/6209/head, will refresh on the next run after 23h 24min (refresh: 1d); use refresh: always to update now
INFO External components are overriding built-in components:
  source: https://github.com/esphome/esphome.git@pull/6209/head
  components: waveshare_epaper
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq/#why-am-i-getting-a-warning-about-strapping-pins
4.20in-v2
WARNING WiFi AP is configured but neither captive_portal nor web_server is enabled. The AP will not be usable for configuration or monitoring. Add 'captive_portal:' or 'web_server:' to your configuration.
INFO Generating C++ source...
INFO Compiling app... Build path: /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper
INFO Checking ESP-IDF 5.5.5 framework ...
INFO Checking ESP-IDF 5.5.5 framework installation ...
INFO Checking ESP-IDF 5.5.5 Python environment ...
INFO Using cached ESP-IDF component list
INFO Writing CMakeLists.txt with the built-in component list...
Executing action: reconfigure
Running cmake in directory /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/Users/test/Library/Caches/esphome/idf/penvs/5.5.5/bin/python -DESP_PLATFORM=1 -DSDKCONFIG=/Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/sdkconfig.home-e-paper -DCCACHE_ENABLE=0 /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper"...
-- Found Git: /usr/bin/git (found version "2.50.1 (Apple Git-155)")
-- Component directory /Users/test/Library/Caches/esphome/idf/frameworks/5.5.5/components/esp_blockdev does not contain a CMakeLists.txt file. No component will be added
-- Minimal build - OFF
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/test/Library/Caches/esphome/idf/tools/xtensa-esp-elf/esp-14.2.0_20260121/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/test/Library/Caches/esphome/idf/tools/xtensa-esp-elf/esp-14.2.0_20260121/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/test/Library/Caches/esphome/idf/tools/xtensa-esp-elf/esp-14.2.0_20260121/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- ESP-TEE is currently supported only on the esp32c6;esp32h2;esp32c5 SoCs
-- Project sdkconfig file /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/sdkconfig.home-e-paper
-- Compiler supported targets: xtensa-esp-elf
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Python3: /Users/test/Library/Caches/esphome/idf/penvs/5.5.5/bin/python (found version "3.14.7") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- USING O3
-- App "home-e-paper" version: 2026.9.1
-- Configuring done (15.0s)
-- Generating done (1.9s)
-- Build files have been written to: /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/build
Executing action: all (aliases: build)
Running ninja in directory /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/build
Executing "ninja all"...
[9/1086] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
otadata,data,ota,0x9000,8K,
phy_init,data,phy,0xb000,4K,
app0,app,ota_0,0x10000,1792K,
app1,app,ota_1,0x1d0000,1792K,
eeprom,data,153,0x390000,4K,
spiffs,data,spiffs,0x391000,60K,
nvs,data,nvs,0x3a0000,384K,
*******************************************************************************
[1051/1086] Building CXX object esp-idf/src/CMakeFiles/__idf_src.dir/esphome/components/waveshare_epaper/waveshare_213v3.cpp.obj
FAILED: esp-idf/src/CMakeFiles/__idf_src.dir/esphome/components/waveshare_epaper/waveshare_213v3.cpp.obj
/Users/test/Library/Caches/esphome/idf/tools/xtensa-esp-elf/esp-14.2.0_20260121/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ @esp-idf/src/CMakeFiles/__idf_src.dir/esphome/components/waveshare_epaper/waveshare_213v3.cpp.obj.rsp -MD -MT esp-idf/src/CMakeFiles/__idf_src.dir/esphome/components/waveshare_epaper/waveshare_213v3.cpp.obj -MF esp-idf/src/CMakeFiles/__idf_src.dir/esphome/components/waveshare_epaper/waveshare_213v3.cpp.obj.d -o esp-idf/src/CMakeFiles/__idf_src.dir/esphome/components/waveshare_epaper/waveshare_213v3.cpp.obj -c /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/src/esphome/components/waveshare_epaper/waveshare_213v3.cpp
/Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/src/esphome/components/waveshare_epaper/waveshare_213v3.cpp:7:16: error: expected constructor, destructor, or type conversion before '(' token
    7 | ESPHOME_LOG_TAG(TAG, "waveshare_2.13v3");
      |                ^
In file included from /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/src/esphome/core/gpio.h:6,
                 from /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/src/esphome/core/hal.h:5,
                 from /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/src/esphome/core/component.h:9,
                 from /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/src/esphome/components/waveshare_epaper/waveshare_epaper.h:3,
                 from /Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/src/esphome/components/waveshare_epaper/waveshare_213v3.cpp:1:
/Users/test/esphome/.esphome/.remote_builds/0EN7zbUf/.esphome/build/home-e-paper/src/esphome/components/waveshare_epaper/waveshare_213v3.cpp: In member function 'void 

I tried with cleaning the build files and resetting the buid env. No changes. It looks like the extarnal components might be an issue. Removing whole section for epaper, it’s workig.

Your YAML is fine, it’s the external component that breaks it.

Your github://pr#6209 swaps out the whole built-in waveshare_epaper component for the code in that PR. The PR never got merged and has drifted out of sync with ESPHome, so after 2026.9.1 it just doesn’t compile anymore. That’s the ESPHOME_LOG_TAG error in waveshare_213v3.cpp (a driver you’re not even using).

Easiest fix: drop external_components and try model: gdey042t81 instead. It’s a built-in model (GoodDisplay 4.2" B/W) and a few people in the PR thread say the Waveshare 4.2" V2 Rev 2.2 actually uses that panel and runs fine on it. Not guaranteed but worth a shot:

display:
  - platform: waveshare_epaper
    id: epaperdisplay
    model: gdey042t81
    cs_pin: GPIO5
    dc_pin: GPIO17
    reset_pin: GPIO16
    busy_pin: GPIO4
    reset_duration: 2ms
    rotation: 180
    update_interval: 180s
    lambda: |-
      ...

If that doesn’t work you’ll have to wait for the PR to get rebased (and add refresh: always next to source:), or fix the PR code yourself so it compiles against 2026.9.1.

Check these: