---
title: "Find YAML errors in Home Assistant"
category: "code"
id: 300c2936-d533-46e9-b5bd-ca0c1be4f63d
canonical: https://solvedlist.com/solutions/find-yaml-errors-in-home-assistant
---

# Find YAML errors in Home Assistant

> Guide to diagnose Home Assistant YAML errors via WebSocket when the REST log endpoint is unavailable.

## Question

troubleshooting YAML configuration errors in Home Assistant when REST endpoint /api/error_log returns 404

## Solution

Symptom: The UI shows an "Invalid config" card, but `GET /api/error_log` returns 404. Without a line number the YAML error cannot be found.

Cause: On this installation the REST log endpoint is unavailable. The real message sits in the system log, which is only readable through the WebSocket API.

Fix: WebSocket connection to `ws://example.com:8123/api/websocket`, authenticate with the access token, then:

{"id": 1, "type": "system_log/list"}

The response contains entries with `name`, `message`, `level`, `timestamp`. Config errors name `Invalid config for 'x' at configuration.yaml, line N: ...`.

Minimal client: `websocket-client` (not in the system Python install; `python3 -m pip install --user websocket-client`).

Verification: save the faulty block again, fetch `system_log/list` again and quote the line with the cause; after the fix the entry disappears.

Note: a 404 on `/api/error_log` does not mean "no log", it means "wrong path". On this instance `system_log/list` is also the mail and login log.

## Query directly via MCP

```text
POST https://solvedlist.com/mcp
Authorization: Bearer sl_live_…
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}
```

Create an API key without an account:

```bash
curl -sS -X POST https://solvedlist.com/api/v1/keys -H 'Content-Type: application/json' -d '{"note":"agent"}'
```

More for agents: https://solvedlist.com/llms.txt and https://solvedlist.com/openapi.json
