/ha-nova:diagnosefrom ha-nova
Diagnoses why a Home Assistant automation, script, device, or integration failed or misbehaved. Uses traces, history, logbook, template probes, and integration diagnostics via HA NOVA Relay for root-cause analysis.
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.
None: SKILL.md is the whole skill.
Root-cause a concrete failure: "why did X not run", "why did X misbehave", "what broke last night".
ha-nova:health reports CURRENT home status (repairs, unavailable entities); ha-nova:history answers plain timeline questions; ha-nova:review audits config quality without a concrete incident. This skill starts from a concrete symptom.logger.set_level debug escalation (see Flow step 5) — every other fix hands off to the owning skill (ha-nova:write, ha-nova:helper, ha-nova:service-call, ha-nova:integration-setup for credential recovery).Read and follow ../ha-nova/session-bootstrap.md.
ha-nova call returns the preview: confirm it once, then ha-nova apply --plan <id>.
File-based relay requests only:
ha-nova relay core --method GET --path <PATH> for REST reads (--out <result-file> for large output)ha-nova call <domain.service> --skill ha-nova:diagnose [--set k=v]… for services (logger.set_level)ha-nova relay ws --data-file <payload-file> for WS commandsha-nova trace latest <entity_id> --json / ha-nova trace list <entity_id> --json / ha-nova trace get <entity_id> <run_id> --json for run traces (positional entity, automation.<id> or script.<id>)--jq-file <filter-file> for non-trivial filters| Source | Call | Notes |
|---|---|---|
| Run traces | ha-nova trace latest <entity_id> --json (also trace list <entity_id>, trace get <entity_id> <run_id>) | First stop for automation/script failures: shows the exact step, condition results, and variables |
| Voice | assist_pipeline/pipeline_debug/list (pipeline_id), then assist_pipeline/pipeline_debug/get (plus pipeline_run_id) | Read-only; resolve via assist_pipeline/pipeline/list |
| State history + logbook | ha-nova history <entity_id> --since <incident minus 30 min, RFC3339> --until <incident plus 30 min, RFC3339> [--logbook] | Summarized states and events (≤ 7 days) |
| Template probe | ha-nova relay core --method POST --path /api/template --body-file <payload-file> with {"template":"{{ ... }}"} | Evaluate the exact condition/template against live state; the rendered result is the string in .data.body |
| Integration diagnostics | WS {"type":"diagnostics/list"}, then GET /api/diagnostics/config_entry/<entry_id> with --out <result-file> | Deep integration state when an integration itself is the suspect |
| Device diagnostics | GET /api/diagnostics/config_entry/<entry_id>/device/<device_id> with --out <result-file> | One device's slice when a single device misbehaves; resolve the (entry_id, device_id) pair via WS diagnostics/list (only entries with a device-diagnostics handler) — a device can carry several entry ids |
Diagnostics redaction is integration-controlled, so downloads are potentially sensitive and NEVER hit bare stdout — save with --out, extract only relevant fields via relay jq before quoting.
HA NOVA never reads log lines (/api/error_log, Core, Supervisor, host, and App logs are refused, exit 4): they can hold passwords, keys, and addresses. It reads log facts instead: WS {"type":"system_log/list"} with no other key answers log_facts (per integration domain and level: count, first_retained, last, in UTC) and unattributed_count, never a message. Read them to see which integration has been failing and since when. first_retained is the oldest entry the log still holds (it keeps a bounded number, and a restart empties it), not the first ever: say "since at least". A fact is a lead, not a finding: an integration's own code names its logger. If the App refuses the read, go on without it. When the message itself would decide the diagnosis, ask the user to open Settings > System > Logs (an App's own log: Settings > Apps > the App > Log), search for the integration or entity, and tell you the few lines around the incident time, without passwords, keys, or addresses. Never ask for the whole log. Lines about other integrations are not evidence for this incident, and no line about it is a finding in itself, not a reason to search wider. The Core log reaches back only to the last restart: for older incidents use logbook/history windows, and say so.
GET /api/config → time_zone), ending now at the latest — read the evidence first, and ask only if it is still ambiguous. Ask one question for the time only when nothing bounds it. Resolve names with ha-nova find "<phrase>" --domain automation (no --name flag).ha-nova trace latest <entity_id> --json; older runs via trace list <entity_id> + trace get <entity_id> <run_id>). No run in the window (no trace, last_triggered null or older): check its own state first (off, unavailable). Automation: take its triggers from ha-nova get <entity_id> --config (blueprint instance: expand once with blueprint/substitute, ../ha-nova/consumer-discovery-preflight.md) and compare each trigger's full predicate (from/not_from, to/not_to, attribute, for:) against the trigger entity's history for the window — only a matching change means it fired, so check the conditions. No change while the entity sits in the to: state → a state trigger fires only on a transition, so that is the root cause: name the state and when it changed. Script: it runs only when called — check its callers (ha-nova get <entity_id> --related) and the logbook (ha-nova history <entity_id> --logbook).ha-nova history --since --until, above; omit --until for a window ending now — a future one is rejected); probe suspect conditions/templates against live state (relay core --method POST --path /api/template --body-file <payload-file>, body {"template":"{{ ... }}"}; the rendered value comes back in .data.body).{"type":"logger/log_info"} → [{"domain":..., "level": <numeric>}]. logger/log_info reports NUMBERS but logger.set_level only accepts NAMES — map the recorded number back before building any payload: 10 → debug, 20 → info, 30 → warning, 40 → error, 50 → critical. A numeric level in a set_level payload is rejected by Home Assistant, which would leave debug logging raised until the next restart. Record the target logger's mapped level — that is the state you must restore. If it has no entry, the effective level is the configured default (HA's own default is warning, but configuration.yaml may set another).ha-nova call logger.set_level --skill ha-nova:diagnose --set homeassistant.components.<domain>=debug.debug — never the raw number, and never a hard-coded warning, which would silently overwrite a level the user set on purpose. Home Assistant has no "remove override" service: an override persists until the next restart, so restoring means setting the recorded level back explicitly (or restarting HA for a truly clean state). Say this plainly before escalating.ha-nova:write / ha-nova:helper; a one-off corrective action -> ha-nova:service-call; invalid credentials or a pending reauthentication -> ha-nova:integration-setup; systemic issues (repairs, unavailable entities) -> ha-nova:health; an ESPHome device's own YAML (pins, removed keys, Wi-Fi/API/OTA) -> ha-nova:esphome.Full relay/upstream error taxonomy: ../ha-nova/relay-api.md -> Error Handling. Diagnose specifics:
trace list): traces are kept per entity with a small cap and reset on reload/restart — say so instead of guessing.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).
Render the Report shape, Diagnosis specialization (output-cards.md → Report Shape): root cause first, then the evidence chain and the recommended fix (the handoff stays internal). Quote logs sparingly.
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.
The debug escalation (logger.set_level) is this skill's single declared mutation: read the current level via logger/log_info first, preview + natural confirmation, and always schedule the restore of THAT recorded level (never a hard-coded default) in the same interaction.
Never "fix" anything from here — fixes hand off to the owning skill after the diagnosis.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub markusleben/ha-nova --plugin ha-nova35 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`./backupUse when checking Home Assistant backup status, creating a backup (including a safety backup before risky changes), inspecting or deleting backups, or changing the automatic-backup schedule, retention, or locations through HA NOVA Relay./calendarUse when listing, reading, creating, updating, or deleting Home Assistant calendar events through HA NOVA Relay./cameraUse when working with Home Assistant cameras — taking a snapshot for the agent to look at, getting a stream URL, recording, casting a camera stream to a TV or speaker display, or turning a camera or its motion detection on and off — through HA NOVA Relay./dashboardUse when listing, reading, building, redesigning, updating, or deleting Home Assistant dashboards, views, and cards (installed custom cards included), checking dashboards for broken cards, or managing Lovelace resources through HA NOVA Relay.Other plugins' skills for the same job