ESP32
Reading the ESP32 configuration
Section titled “Reading the ESP32 configuration”A component that depends on an esp32: setting asks the esp32 platform for it from its FINAL_VALIDATE_SCHEMA
instead of reading the esp32 config itself, so it keeps working when esp32 changes how it stores that setting.
esp32.execute_from_psram(): whetherexecute_from_psramis on underesp32: framework: advanced:.esp32.user_sdkconfig_bool(name): a yes/no option from the user’sesp32: framework: sdkconfig_options:. It returnsTruefory,Falseforn(in any case) andNonewhen the user did not set it or set something else, so a check can tell “off” from “left at the ESP-IDF default”.
from esphome.components import esp32import esphome.config_validation as cvfrom esphome.types import ConfigType
CONF_TASK_CORE = "task_core"
def _final_validate(config: ConfigType) -> ConfigType: if config[CONF_TASK_CORE] == 1 and esp32.user_sdkconfig_bool("CONFIG_FREERTOS_UNICORE"): raise cv.Invalid("task_core: 1 requires FreeRTOS dual-core mode") return config
FINAL_VALIDATE_SCHEMA = _final_validateBoth read the full configuration, so they only work during final validation, not in to_code.
They are available in ESPHome 2026.12.0 and later (esphome/esphome#23524, esphome/esphome#23575).
Copyright © 2026 ESPHome - A project from the Open Home Foundation