For me it’s working well in ESPHome 2025.11.0 in that way:
substitutions:
device_name: prueba
friendly_name: Prueba
esp32:
board: espc2-01
variant: esp32c2
flash_size: 2MB
framework:
type: esp-idf
version: 5.3.1
sdkconfig_options:
CONFIG_XTAL_FREQ_26: y
esphome:
<<: !include common/esphome.yaml
platformio_options:
platform:
- https://github.com/ewpa/platform-espressif32.git#esp32c2
wifi:
<<: !include common/wifi.yaml
#captive_portal:
mdns:
disabled: true
api:
<<: !include common/api.yaml
ota:
<<: !include common/ota.yaml
logger:
light:
- platform: status_led
name: "LED"
pin:
number: 2
inverted: true