/ha-nova:maintenancefrom ha-nova
Repairs Home Assistant recorder statistics (orphaned stats, unit mismatches, sum spikes), purges history, and cleans dead entity-registry entries via HA NOVA Relay.
Ships in ha-nova. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read (always allowed):
recorder/validate_statistics, grouped by issue type)recorder/info: backlog, recording, migration_in_progress)Gated writes:
recorder.purge, recorder.purge_entities)recorder/import_statistics, own confirmation)Not in scope:
ha-nova:energy)ha-nova:health); the long-unavailable report here exists to qualify cleanup candidates, not to answer "is everything OK"ha-nova:backup), updates (ha-nova:updates)ha-nova:organize (integration-supported, HA 2026.9+)ha-nova:mqtt (retained-discovery cleanup); registry removal here only sticks after that topic is clearedRead and follow ../ha-nova/session-bootstrap.md.
ha-nova call previews; confirm once, then apply per its next_step (a plan.code: ha-nova apply --confirm <code> --plan <id>).
File-based requests: ha-nova relay ws --data-file <payload-file>, or ha-nova plan raw where the reference says; --out <result-file> for large responses. WS body: .data; REST body: .data.body (../ha-nova/relay-api.md → Standard Envelope).
Payloads, issue matrix, and gate checklists: ../maintenance/maintenance-reference.md — read it before any write.
WS {"type":"recorder/validate_statistics"} → group results by issue type and report counts per group with examples by name (else ID) — never dump hundreds. Map each type to its default remediation from the reference matrix (relabel vs. clear vs. report-only). Hundreds of no_state orphans are normal on older installs.
Grouped clears and per-config-entry registry removals are batch operations per ../ha-nova/batch-safety.md — one issue group or config entry per manifest, one confirmation per manifest, completion ledger; every safety gate below stays unchanged. A registry removal may instead ride a cross-family destructive cleanup manifest (../ha-nova/grouped-change-set.md) with every gate below intact.
units_changed → default is the non-destructive relabel (recorder/update_statistics_metadata, unit_class REQUIRED) — only after confirming the values are the same quantity merely mislabeled; if the sensor changed what it measures, relabel corrupts data — then clear or keep.no_state etc.) → recorder/clear_statistics is IRREVERSIBLE. Preview per group: the FULL ID list (write long lists to a file the user can open — a capped sample never authorizes the uncapped set), each ID's data span and has_sum, and — mandatory — the energy/get_prefs cross-check: whether any ID appears anywhere in that JSON or in energy/info → cost_sensors (warn loudly — clearing erases its energy history), plus a scan of storage dashboards for the IDs (YAML dashboards stay a stated caveat). Manifest-bound confirmation (../ha-nova/batch-safety.md) — it binds to one issue group and the manifest's full enumerated ID set; a group above the batch cap splits into multiple manifests over disjoint subsets of that group, each with its own preview and code; never one confirmation for multiple groups. Execute in one call, but verify per ID by re-running validate; a WS timeout after ~10 s is NOT failure — the job finishes in the background, re-read instead of retrying.statistics_during_period (hourly; 5minute only if <10 days old), derive the corrected change from neighboring buckets or user input, then recorder/adjust_sum_statistics with adjustment = corrected − original at the bucket's start. Reversible via the inverse call — offer that rollback. Check energy/info → cost_sensors for a linked cost statistic; verify each of the pair before offering the paired fix. Verify by re-reading the bucket.recorder.purge (service): preview keep_days + deletions (states/events/short-term statistics). Quantify the impact first: read a small bounded pre-cutoff history sample so the preview can state that data older than keep_days exists and will actually go. Long-term statistics are NEVER purged — say so. repack: true only with an explicit warning: rebuilds the database, blocks recording, needs free disk. apply_filter: true additionally deletes data the recorder's include/exclude filters exclude — and for those entities/event types HA purges up to the CURRENT time, not the keep_days cutoff, so their recent history is erased too. The preview must say exactly that; when in doubt, offer the plain purge without apply_filter. The call is fire-and-forget — verify recorder/info (backlog normal, recording: true) plus a pre-cutoff history read returning empty (allow minutes). The person's own confirmation.recorder.purge_entities: default keep_days: 0 = ALL state history for the match. Expand domains/entity_globs selectors to the concrete matched entity list BEFORE the preview — the preview and its confirmation bind to that exact list, never the raw selector. Say explicitly that statistics are NOT touched (a separate clear is a conscious follow-up). The person's own confirmation. Verify by re-reading a bounded history window for one matched entity (allow minutes); recorder/info alone cannot prove deletion.Detection: join /api/states with config/entity_registry/list. A candidate must pass ALL gates in the reference checklist — headline gates: state is unavailable WITH attribute restored: true; owning config entry is gone or permanently failed (never setup_retry/loading); not disabled_by; not part of a whole-integration outage (group those as one finding — report only, never removal); search/related returns no automations/scripts/scenes/dashboards — with the honest caveat that YAML dashboards and templates are not covered; entities with config_entry_id: null (template/YAML platforms) are removal candidates only when the ghost persists across a restart (method in the reference — if no restart boundary can be established, report only; never restart or reload HA from this skill).
Live/healthy entities: refuse removal — offer disable via ha-nova:organize instead; the gates are not negotiable.
Preview per config entry with the LTS consequence named ("registry removal keeps statistics — they then report as no_state"; deleted entries are restorable for ~30 days if the integration returns). Manifest-bound typed confirmation, one confirmation and one config entry per manifest (../ha-nova/batch-safety.md); execute per entity via config/entity_registry/remove; verify by re-reading the registry.
Per entity, label the timestamp source: LTS last-data bucket (reliable, years back, numeric sensors only), state history transition (only within recorder retention; how-to in the reference), or "since last restart at earliest" (last_changed resets on restart — never present it as the outage start).
../ha-nova/relay-api.md → Error Handling.Apply ../ha-nova/output-rules.md: plain words, HA names verbatim; unless asked or names clash, no ids, "entity", modes, Relay/HA URLs, snapshots, raw JSON. Previews, deletes, and results use the Cards defined there (../ha-nova/output-cards.md).
Maintenance / StatusPlanned changeOptionsVerificationNext stepUse stable localized slot labels in this order; omit empty slots. Triage renders the Report shape; grouped lists render the List Frame (capped example lists).
Safety Core: before any write, apply ../ha-nova/safety-core.md; not yet in this conversation → read it first; unreadable or incomplete → stop and write nothing.
Drafts follow ../ha-nova/smallest-solution.md: the complete requested outcome in the simplest safe design, nothing speculative.
search/related verdicts fail closed: verify ok=true and data is an object before projecting family keys (../ha-nova/relay-api.md → Parsing rule); a failed or unexecuted scan is inconclusive — never a no-consumer result. An inconclusive scan fails the ghost-entity removal gate: report only, never remove.
Every write: preview → confirmation → per-item verification. Clear/purge/registry remove take the person's own confirmation (a code only where say shows one); the reversible spike adjustment and unit relabel take payload-bound natural confirmation — offer the spike rollback.
Backup gate: before clearing statistics in bulk, purging with low keep_days, repack, or bulk registry removal, check for a recent backup via ha-nova:backup (proportional — never for a single small fix).
Never remove an entity that is merely offline; when in doubt, report instead of removing.
What SKILL.md sets; muted values are Claude Code's defaults
35 skills in this plugin
/adminUse when managing Home Assistant people, zones, tags, user accounts, general settings (name, location, units, time zone), Labs features, and analytics sharing — creating a person, drawing a zone, adding a tag, or reviewing who has access — through HA NOVA Relay./assistUse when working with Home Assistant's own built-in voice assistant (Assist) — testing what it understands, inspecting, editing, or creating Assist pipelines, managing which entities are exposed to voice, listing TTS/STT/wake-word engines, and teaching Assist custom sentences — through HA NOVA Relay. Not for Alexa or Google Assistant — setting those up is `ha-nova:integration-setup` (or `ha-nova:yaml-config` for a manual cloud config), and one that STOPPED working is a concrete failure for `ha-nova:diagnose`./backupnpx claudepluginhub markusleben/ha-nova --plugin ha-novaOther plugins' skills for the same job