helper
Use when creating, updating, deleting, or listing Home Assistant helpers — timers, counters, toggles, dropdowns, text and number inputs, schedules, plus template, threshold, utility-meter and other config-entry helpers — through HA NOVA Relay.
markusleben · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add markusleben/ha-nova --skill helper技能说明
name: helper description: Use when creating, updating, deleting, or listing Home Assistant helpers — timers, counters, toggles, dropdowns, text and number inputs, schedules, plus template, threshold, utility-meter and other config-entry helpers — 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 Helper
Scope
ha-nova:helper has two helper families:
- Storage-based family — full CRUD for:
input_boolean,input_number,input_text,input_select,input_datetime,input_button,counter,timer,schedule
- Config-entry family — CRUD support for 12 domains:
utility_meter,derivative,integration,min_max,threshold,tod,statistics,group,history_stats,template,generic_thermostat,switch_as_xgeneric_thermostat/switch_as_xnote: promoted without an observed field inventory — every field comes from the live form perskills/ha-nova/live-schema-preflight.md; aswitch_as_xcreate hides the source switch entity behind the new one, and its target domain is create-only (changing it means delete + recreate) — say both in the previewgroupnote: handled through the live menu-driven flow; end-to-end support is verified for thesensorsubtype, and other subtypes must stay anchored to the live step schema instead of guessed fieldstemplatenote: same menu-driven flow (17 entity types); end-to-end support is verified for thesensorsubtype. Thestatefield is a Jinja template — author it perskills/ha-nova/template-guidelines.mdand apply the template-level reliability checks (missingfloat/intdefaults, boolean-string comparisons) BEFORE submitting; a broken template renders the entityunavailable, so post-write verification must read the rendered state, not just entry existence
Not handled here:
- other config-entry helper families:
trend,random,filter,generic_hygrostat
local_todolist config entries (useha-nova:todo)- automations/scripts config mutations (use
ha-nova:write)
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
Write payloads with the client's native file-writing tool, then use:
ha-nova relay ws --data-file <payload-file>ha-nova relay core --method <METHOD> --path <PATH> --body-file <payload-file>ha-nova relay ... --out <result-file>for larger read/verify output--jq-file <filter-file>for non-trivial filters; keep inline--jqfor short selectors only
Family-specific transport:
- Storage-based family: WS CRUD + WS list
- Config-entry family: WS
config_entries/get+ WS entity-registry joins for list/read; relay/coreconfig-entry flow, options-flow, and delete writes
Flow
Drafts follow skills/ha-nova/smallest-solution.md: the complete requested outcome in the simplest safe design — never an extra helper, option, or abstraction the request does not need.
Family 1: Storage-based helpers
Listing helpers
Use the compact entity registry (abbreviated keys: ei = entity_id, en = name, ai = area_id).
Create <payload-file> with {"type":"config/entity_registry/list_for_display"}, then run:
ha-nova relay ws --data-file <payload-file> --jq-file <filter-file>
Write <filter-file> with:
[.data.entities[] | (.ei | split(".")[0]) as $domain | select(["input_boolean","input_number","input_text","input_select","input_datetime","input_button","counter","timer","schedule"] | index($domain)) | {entity_id: .ei, name: .en, area_id: .ai}]
| {total: length, shown: (.[0:30] | length), omitted: ([length - 30, 0] | max), truncated: (length > 30), matches: .[0:30]}
If user filters by type, narrow the domain filter to that single storage-based domain.
Keyword search
ha-nova relay ws --data-file <payload-file> --jq-file <filter-file>
Write <filter-file> with:
[.data.entities[] | (.ei | split(".")[0]) as $domain | select(["input_boolean","input_number","input_text","input_select","input_datetime","input_button","counter","timer","schedule"] | index($domain)) | select((.ei + " " + (.en // "")) | test("KEYWORD";"i")) | {entity_id: .ei, name: .en, area_id: .ai}]
| {total: length, shown: (.[0:20] | length), omitted: ([length - 20, 0] | max), truncated: (length > 20), matches: .[0:20]}
If 0 results: try synonyms or shorter stems. Never dump entire domains.
While truncated is true the list proves neither absence nor uniqueness — narrow further until it is false; the counts are exact, the cap trims display only.
Reading a single helper
- Determine type from entity_id domain prefix.
- Fetch full config via type-specific list:
Writeha-nova relay ws --data-file <payload-file> --jq-file <filter-file><filter-file>with:[.data[] | select(.name | test("KEYWORD";"i"))] - No single-item read endpoint — always
{type}/list+ filter.
Creating a helper
- Validate intent against
skills/ha-nova/helper-schemas.mdfor required/optional fields. Validate cross-field constraints pre-write too, instead of leaving them to the post-write review:input_numbermin<max;counterminimum<maximum;input_selectinitialmust be inoptions;input_datetimeneedshas_dateand/orhas_time;timerdurationinHH:MM:SS. Fix or ask before writing. - Use-case defaults (create only, skip on update/delete):
- Infer use-case from helper name + type using general HA knowledge.
- Consult
skills/ha-nova/helper-schemas.md→ Suggested Defaults for principles and field name reminders. - If sensible defaults can be inferred: render them as the Suggestion Block (output-rules.md), max 4 as numbered list (value defaults fill the