Get ESPHome device YAML config
esphome_get_configRead an ESPHome device's YAML configuration from /config/esphome/ to inspect current settings before editing it with write or LVGL tools.
Instructions
Read one ESPHome device's YAML config from /config/esphome/.
Resolves name to <name>.yaml under _ESPHOME_DIR, rejecting path
separators/leading dots/paths that escape that directory.
Use when: inspecting a device's current configuration before editing it
with esphome_write_config or one of the esphome_lvgl_* editors.
Not for: a device's HA entities — use esphome_get_device_entities.
Returns: {"name": <filename>, "content": <yaml text>}.
Errors: {"error": "Invalid device name: ..."} for a path-escaping
name; {"error": "Not found: ...", "esphome_dir": ...} when the file
doesn't exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Device name, with or without the '.yaml' suffix, e.g. 'kitchen_sensor'. Discover names with `esphome_list_devices`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||