Create, update, and manage Home Assistant dashboards (Lovelace) programmatically via WebSocket API. Use when the user asks to create/update HA dashboards, add dashboard views, modify Lovelace configurations, or work with Home Assistant UI components. Supports the modern sections-based dashboard format (HA 2026+) and legacy card-based layouts.
Manage Home Assistant dashboards (Lovelace) programmatically via WebSocket API.
scripts/ha_dashboard.py create \
"wss://ha.example.com/api/websocket" \
"YOUR_TOKEN" \
dashboard-config.yaml \
"Network Dashboard" \
"network" \
"mdi:network"
scripts/ha_dashboard.py list \
"wss://ha.example.com/api/websocket" \
"YOUR_TOKEN"
scripts/ha_dashboard.py update \
"wss://ha.example.com/api/websocket" \
"YOUR_TOKEN" \
"network" \
updated-config.yaml
scripts/ha_dashboard.py delete \
"wss://ha.example.com/api/websocket" \
"YOUR_TOKEN" \
"network"
Understand requirements - What entities, layout, and organization does the dashboard need?
Check available entities - Query HA REST API to get available sensors, switches, etc.:
curl -H "Authorization: Bearer TOKEN" \
https://ha.example.com/api/states | grep entity_id
Design dashboard structure - Plan sections and cards based on:
Create YAML configuration - Use modern sections format (see references/dashboard-config.md)
Execute with script - Run ha_dashboard.py create with the config
Verify - Check the dashboard in HA web interface
Iterate - Update as needed with ha_dashboard.py update
Modern HA dashboards use a sections-based layout: