diff --git a/esphome/build_gen/arduino8266.py b/esphome/build_gen/arduino8266.py index 8fad93ae2f..fd561078b4 100644 --- a/esphome/build_gen/arduino8266.py +++ b/esphome/build_gen/arduino8266.py @@ -744,9 +744,9 @@ def write_project(paths: InstalledPaths, ccache: str | None) -> bool: config = _resolve_build_config(flag_defines) esp8266_data = CORE.data[KEY_ESP8266] board = esp8266_data[KEY_BOARD] - # The only in-tree rejection until the native-toolchain validator - # (_validate_native_toolchain, final PR of the chain) gates boards at - # config time; CONF_BOARD itself is a free-form string + # Config validation (_validate_native_toolchain) already gates boards; + # kept as defense-in-depth for direct calls, since CONF_BOARD itself is + # a free-form string if board not in ESP8266_BOARD_BUILD: raise EsphomeError(f"Board '{board}' is not supported by the native toolchain") board_build = ESP8266_BOARD_BUILD[board]