跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

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 mode is storage
  • 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/list
  • lovelace/dashboards/create
  • lovelace/dashboards/update
  • lovelace/dashboards/delete
  • lovelace/config
  • lovelace/config/save
  • lovelace/resources
  • lovelace/resources/create
  • lovelace/resources/update
  • lovelace/resources/delete

Critical behavior:

  • lovelace/config/save is a full-document overwrite. Payload shape: {"type":"lovelace/config/save","url_path":"<url_path>","config":{"views":[...]}} — the whole document goes under config, and whatever is missing from it is gone. For the DEFAULT dashboard omit url_path entirely; the field takes a string, so an explicit null is rejected and the save never lands
  • there is no partial update endpoint
  • omitted views/cards are lost
  • lovelace/dashboards/list is the source of truth for dashboard_id, url_path, and mode
  • lovelace/config/delete is not the dashboard delete path for this skill
  • lovelace/resources shows 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.

  1. Resolve the dashboard target.
    • Always list dashboards first with lovelace/dashboards/list.
    • Match by url_path, title, or current identity.
    • Keep both identifiers:
      • dashboard_id for lovelace/dashboards/update|delete
      • url_path for lovelace/config|save
    • Ask one blocking question only if more than one dashboard still matches.
  2. Check write/delete eligibility.
    • use the matched dashboard mode from lovelace/dashboards/list
    • only mode=storage is writable/deletable here
    • if mode is not storage, stop and explain that this skill will not write or delete it
  3. Choose the mutation path.
    • create shell: preview title, url_path, icon, require_admin, show_in_sidebar, confirm this exact preview, then call lovelace/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/update with dashboard_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
    • resource inventory: use lovelace/resources
    • resource create/update:
      • preview res_type and url
      • confirm this exact preview
      • call lovelace/resources/create|update
    • resource delete:
      • preview the exact resource identity
      • require exact confirmation code confirm:<token>
      • call lovelace/resources/delete with resource_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 .cards and .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
阅读完整来源 ↗