Get ESPHome add-on log output
esphome_get_addon_logsFetch recent ESPHome add-on log output to diagnose compile, OTA, or device connection failures. Returns raw log lines from the Supervisor API for troubleshooting.
Instructions
Get the ESPHome add-on's recent log output.
Fetches raw text logs via the Supervisor API and returns the last
lines lines. Shows compile errors, OTA status and device connection
events. The add-on slug is discovered dynamically — see
esphome_get_addon_info.
Use when: diagnosing why esphome_compile_device/esphome_upload_device/
esphome_validate_config failed, or checking recent device activity.
Not for: any other add-on's logs — use
supervisor_get_addon_logs with its slug instead.
Returns: {"slug": ..., "logs": "<text>", "total_lines": <int>}.
Errors: {"error": "ESPHome add-on not found. Tried: [...]"} when no
matching slug responds; {"error": "HTTP <status>"} for a non-404 HTTP
error; {"error": str(e)} for any other failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Number of trailing log lines to return, e.g. 150. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||