ha-dashboard-create
Creates and updates Home Assistant Lovelace dashboards programmatically via WebSocket API with dashboard structure, view configuration, and entity validation. Use when asked to "create HA dashboard", "automate dashboard creation", "WebSocket dashboard API", "programmatic Lovelace", or "validate dashboard entities".
What this skill does
Works with Python websocket-client, WebSocket API authentication, and Lovelace configuration.
# Home Assistant Dashboard Creation
Create and update Lovelace dashboards programmatically using the WebSocket API.
## CRITICAL: Dashboard URL Path Requirements
**Home Assistant requires dashboard URL paths to contain a hyphen:**
- ✅ CORRECT: "climate-control", "mobile-app", "energy-monitor"
- ❌ WRONG: "climate", "mobile", "energy"
**Rule:** Always use kebab-case with at least one hyphen in the `url_path` field.
## When to Use This Skill
Use this skill when you need to:
- Create Home Assistant dashboards programmatically via WebSocket API
- Automate dashboard creation and updates for multiple environments
- Build dashboard generators for dynamic card configurations
- Validate dashboard entities before deployment
- Manage dashboards as code with version control
- Programmatically update existing dashboard configurations
Do NOT use when:
- You can use the Home Assistant UI dashboard editor (simpler for manual changes)
- Building simple static dashboards (UI editor is more intuitive)
- You haven't created a long-lived access token for API authentication
## Usage
1. **Connect to WebSocket**: Authenticate with long-lived access token
2. **Check if exists**: Query existing dashboards with `lovelace/dashboards/list`
3. **Create dashboard**: Use `lovelace/dashboards/create` with url_path containing hyphen
4. **Save configuration**: Update config with `lovelace/config/save`
5. **Verify**: Check HA UI and system logs for errors
## Quick Start
```python
import json
import websocket
HA_URL = "http://192.168.68.123:8123"
HA_TOKEN = os.environ["HA_LONG_LIVED_TOKEN"]
def create_dashboard(url_path: str, title: str, config: dict):
"""Create or update a dashboard.
Args:
url_path: Dashboard URL path (must contain hyphen, e.g., "climate-control")
title: Dashboard display title
config: Dashboard configuration dict
"""
# Validate url_path contains hyphen
if "-" not in url_path:
raise ValueError(f"url_path must contain hyphen: '{url_path}' -> '{url_path}-view'")
ws_url = HA_URL.replace("http://", "ws://") + "/api/websocket"
ws = websocket.create_connection(ws_url)
msg_id = 1
# 1. Receive auth_required
ws.recv()
# 2. Send auth
ws.send(json.dumps({"type": "auth", "access_token": HA_TOKEN}))
ws.recv() # auth_ok
# 3. Check if dashboard exists
ws.send(json.dumps({"id": msg_id, "type": "lovelace/dashboards/list"}))
msg_id += 1
response = json.loads(ws.recv())
exists = any(d["url_path"] == url_path for d in response.get("result", []))
# 4. Create if doesn't exist
if not exists:
ws.send(json.dumps({
"id": msg_id,
"type": "lovelace/dashboards/create",
"url_path": url_path, # Must contain hyphen!
"title": title,
"icon": "mdi:view-dashboard",
"show_in_sidebar": True,
}))
msg_id += 1
ws.recv()
# 5. Save configuration
ws.send(json.dumps({
"id": msg_id,
"type": "lovelace/config/save",
"url_path": url_path,
"config": config,
}))
ws.recv()
ws.close()
```
## WebSocket Message Types
| Type | Purpose |
|------|---------|
| `lovelace/dashboards/list` | List all dashboards |
| `lovelace/dashboards/create` | Create new dashboard |
| `lovelace/dashboards/delete` | Delete dashboard |
| `lovelace/config/save` | Save dashboard config |
| `lovelace/config` | Get dashboard config |
| `system_log/list` | Check for lovelace errors |
See [references/card-types.md](references/card-types.md) for dashboard configuration structure and common card types.
## Error Checking
### Validate Dashboard Configuration
```python
# 1. Check system logs for lovelace errors
ws.send(json.dumps({"id": 1, "type": "system_log/list"}))
logs = json.loads(ws.recv())
# Filter for 'lovelace' or 'frontend' errors
# 2. Validate dashboard configuration
ws.send(json.dumps({
"id": 2,
"type": "lovelace/config",
"url_path": "climate-control" # Must contain hyphen
}))
config = json.loads(ws.recv())
# 3. Validate entity IDs exist
ws.send(json.dumps({"id": 3, "type": "get_states"}))
states = json.loads(ws.recv())
entity_ids = [s["entity_id"] for s in states["result"]]
# 4. Check if entities used in dashboard exist
for card in dashboard_config["views"][0]["cards"]:
if "entity" in card:
if card["entity"] not in entity_ids:
print(f"Warning: Entity {card['entity']} not found")
```
### Common Error Patterns
1. **URL path missing hyphen**: `"url_path": "climate"` → Add hyphen: `"climate-control"`
2. **Entity doesn't exist**: Check entity ID in Developer Tools → States
3. **Custom card not installed**: Install via HACS first
4. **JavaScript errors**: Check browser console (F12) for configuration errors
## Entity Validation
Verify entity IDs exist before using them in dashboards.
See [references/entity-patterns.md](references/entity-patterns.md) for entity validation functions and common entity patterns.
## Supporting Files
- **scripts/create_dashboard.py** - Complete working example with entity validation
- **references/card-types.md** - Dashboard configuration structure and card types
- **references/entity-patterns.md** - Entity validation and common patterns
## Workflow
1. **Design dashboard** - Plan views and card layout
2. **Validate entities** - Check all entity IDs exist
3. **Connect to WebSocket** - Authenticate with HA
4. **Check if exists** - Query existing dashboards
5. **Create dashboard** - Create if new (ensure url_path has hyphen!)
6. **Save configuration** - Update dashboard config
7. **Verify** - Check in HA UI and system logs for errors
## URL Path Examples
| Dashboard Type | Bad URL Path | Good URL Path |
|----------------|--------------|---------------|
| Climate monitoring | "climate" | "climate-control" |
| Mobile view | "mobile" | "mobile-app" |
| Energy tracking | "energy" | "energy-monitor" |
| Air quality | "air" | "air-quality" |
| Irrigation | "irrigation" | "irrigation-control" |
## Troubleshooting
### Dashboard not appearing in sidebar
1. Check `show_in_sidebar: True` in dashboard creation
2. Verify `url_path` contains hyphen
3. Refresh browser (Ctrl+Shift+R)
4. Check HA logs for errors
### Configuration not saving
1. Verify WebSocket authentication succeeded
2. Check `url_path` matches existing dashboard
3. Validate JSON structure (no syntax errors)
4. Check system logs via `system_log/list`
### Entity not found errors
1. Get all entities: `{"type": "get_states"}`
2. Compare with entities used in dashboard
3. Fix entity IDs or remove missing entities
4. Ensure entity has proper `state_class` for sensors
## Official Documentation
- [Lovelace Dashboards - Home Assistant](https://www.home-assistant.io/dashboards/)
- [WebSocket API - Home Assistant](https://developers.home-assistant.io/docs/api/websocket)
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.