搜索与研究
dashboard
Use when listing, reading, creating, updating, or deleting storage-backed Home Assistant dashboards, Lovelace resources, and targeted card changes through HA NOVA Relay.
markusleben · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add markusleben/ha-nova --skill dashboard技能说明
name: dashboard description: Use when listing, reading, creating, updating, or deleting storage-backed Home Assistant dashboards, Lovelace resources, and targeted card changes through HA NOVA Relay. license: MIT compatibility: Requires the ha-nova CLI (run 'ha-nova setup' first) and the HA NOVA Relay in Home Assistant (App, or standalone container on Container/Core).
HA NOVA Dashboard
Scope
Storage dashboard work only:
- list dashboards
- read one dashboard config
- list Lovelace resources
- inspect the current dashboard structure: views, cards, badges, header cards
- create a new storage dashboard shell
- save a strategy config on a created shell (HA generates the content)
- update dashboard metadata
- create, update, and delete Lovelace resources
- find a specific dashboard element before changing it
- add, update, move, and delete cards inside existing views
- delete an existing storage dashboard
This skill is safety-first:
- always resolve the target from
lovelace/dashboards/list - only write/delete when the dashboard
modeisstorage - always read the full current dashboard before any content write
- always save the full merged config, never a guessed partial fragment
- always read back and verify the intended change
Not in scope:
- raw broad Lovelace editing without a concrete requested change
- view create/delete/reorder
- non-storage dashboard writes/deletes
- freeform new custom-card creation
- energy dashboard preferences
If the user asks for a broad redesign instead of a concrete safe change, narrow the request first. Do not guess.
Bootstrap (once per session)
Read and follow ../ha-nova/session-bootstrap.md.
Verify relay CLI: ha-nova relay health
If this fails: ha-nova setup
Relay Contract
Use file-based WS requests only:
ha-nova relay ws --data-file <payload-file>ha-nova relay ws --data-file <payload-file> --out <result-file>ha-nova relay ws --data-file <payload-file> --jq-file <filter-file>
Relevant WS types:
lovelace/dashboards/listlovelace/dashboards/createlovelace/dashboards/updatelovelace/dashboards/deletelovelace/configlovelace/config/savelovelace/resourceslovelace/resources/createlovelace/resources/updatelovelace/resources/delete
Critical behavior:
lovelace/config/saveis a full-document overwrite. Payload shape:{"type":"lovelace/config/save","url_path":"<url_path>","config":{"views":[...]}}— the whole document goes underconfig, and whatever is missing from it is gone. For the DEFAULT dashboard omiturl_pathentirely; the field takes a string, so an explicitnullis rejected and the save never lands- there is no partial update endpoint
- omitted views/cards are lost
lovelace/dashboards/listis the source of truth fordashboard_id,url_path, andmodelovelace/config/deleteis not the dashboard delete path for this skilllovelace/resourcesshows installed Lovelace resources, but that alone is not proof that a custom-card schema is safe to invent
Flow
Drafts follow skills/ha-nova/smallest-solution.md: the complete requested outcome in the simplest safe design, nothing for hypothetical future needs.
- Resolve the dashboard target.
- Always list dashboards first with
lovelace/dashboards/list. - Match by
url_path, title, or current identity. - Keep both identifiers:
dashboard_idforlovelace/dashboards/update|deleteurl_pathforlovelace/config|save
- Ask one blocking question only if more than one dashboard still matches.
- Always list dashboards first with
- Check write/delete eligibility.
- use the matched dashboard
modefromlovelace/dashboards/list - only
mode=storageis writable/deletable here - if
modeis notstorage, stop and explain that this skill will not write or delete it
- use the matched dashboard
- Choose the mutation path.
- create shell: preview
title,url_path,icon,require_admin,show_in_sidebar, confirm this exact preview, then calllovelace/dashboards/create - strategy config: a created shell may be saved with
{"strategy":{"type":"areas"}}or{"strategy":{"type":"original-states"}}as the ENTIRE config — Home Assistant generates all views and cards at render time. Normal preview/confirm/drift rules apply; the card allowlist is not consulted because no cards are authored here. Freeform card authoring beyond the allowlist stays refused, and switching a populated dashboard TO a strategy discards its stored views — that save is destructive (confirm:<token>+ auto config snapshot) - metadata update: preview the exact metadata fields, confirm this exact preview, then call
lovelace/dashboards/updatewithdashboard_id- only send changed metadata fields supported there:
title,icon,show_in_sidebar,require_admin - do not resend
url_path,mode, or unrelated config fields in the update payload
- only send changed metadata fields supported there:
- resource inventory: use
lovelace/resources - resource create/update:
- preview
res_typeandurl - confirm this exact preview
- call
lovelace/resources/create|update
- preview
- resource delete:
- preview the exact resource identity
- require exact confirmation code
confirm:<token> - call
lovelace/resources/deletewithresource_id
- content update / card operation:
- read the current dashboard config with
lovelace/config - build a compact inventory of views, cards, badges, and header cards
- jq filters must null-guard absent structure keys: empty dashboards have no
views— iterate(.views // [])[], never bare.views[]; same for.cardsand.badges - resolve the exact target by view, title/heading text, entity reference, card type, or explicit position
- merge the requested change in memory
- template-capable fields (Jinja-documented per card type: Markdown
content) run the Render Loop (skills/ha-nova/template-guidelines.md) before the preview; titles and built-in visibility are not Jinja
- read the current dashboard config with
- create shell: preview