Validate ESPHome device config
esphome_validate_configValidate an ESPHome device's YAML configuration without compiling firmware or fetching PlatformIO packages, catching errors before you build.
Instructions
Validate an ESPHome device's YAML config without compiling it.
Uses the devices/validate command on Device Builder's newer
multiplexed /ws protocol (github.com/esphome/device-builder,
docs/API.md) — the legacy /validate route from the old ESPHome
dashboard no longer exists. Unlike esphome_compile_device, this never
builds firmware or fetches PlatformIO packages. If the dashboard needs
a username/password, this fails fast instead of hanging (no credential
wiring exists here).
Use when: checking a config's validity quickly, e.g. before
esphome_compile_device.
Not for: a full firmware build — use esphome_compile_device; not for
LVGL-only structural checks — use esphome_lvgl_validate, which runs
without the dashboard.
Returns: {"device", "action": "validate", "success", "result", "log_tail", "log_lines"}.
Errors: {"error": "Invalid device name: ..."} for a path-escaping or
blocked (e.g. 'secrets') name; otherwise one of
esphome_dashboard.DashboardError's stable codes —
esphome_auth_required (credentials this tool cannot supply) and
esphome_unreachable add diagnosis (see esphome_ping_dashboard);
timeout adds log_tail/log_lines/job_may_still_be_running
(always False — validation enqueues no job); esphome_command_failed
adds dashboard_error_code/details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Device name, with or without the '.yaml' suffix, e.g. 'kitchen_sensor'. | |
| timeout | No | Maximum seconds to wait for the validation result, e.g. 60. | |
| log_lines | No | Number of trailing log lines to return, e.g. 200. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||