Fallback

From markusleben/ha-nova · View interactive version

Fallback is an AI agent skill from the GitHub repository markusleben/ha-nova. Mandatory fallback for any HA NOVA task without a dedicated subskill. Must be invoked before any raw relay write operation. Covers Apps and Zigbee/Z-Wave.

How to use this skill

Skill file

HA NOVA Fallback

Scope

Mandatory fallback for HA features without a dedicated skill. Three tiers:

All relay calls in this skill are experimental -- always follow the Safety section below.

Bootstrap (before Home Assistant tasks)

Read and follow ../ha-nova/session-bootstrap.md before the first

Home Assistant or Relay-Ready task in this session.

Relay health is needed only when executing experimental relay calls, not for

Roadmap/External guidance.

Relay Contract

For every Relay-Ready call in this skill:

Capability Map

| Feature | Status | Skill |

|---------|--------|-------|

| Automations / Scripts CRUD | Covered | read / write |

| Config Review | Covered | review |

| Helpers (9 storage + 16 config-entry) | Covered | helper |

| Entity Search | Covered | entity-discovery |

| Service Calls | Covered | service-call |

| Relay Setup | Covered | onboarding |

| Dashboard / Lovelace (storage lifecycle, cards, resources) | Covered | dashboard |

| Scenes (storage CRUD) | Covered | scene |

| History / Logbook / Statistics queries | Covered | history |

| System Health / Repairs | Covered | health |

| Logs / diagnostics (why something specific failed: traces, history, root cause) | Covered | diagnose |

| Host / Supervisor / App logs | Covered | diagnose (the user reads them in Home Assistant: diagnose → Logs) |

| Media players (transport, volume, source, grouping, browsing, TTS announce) | Covered | media |

| Notifications (targets, mobile-app sends, persistent notifications) | Covered | notify |

| Actionable-notification callbacks (waiting for a button press) | Covered for the durable path | write (an automation on mobile_app_notification_action) |

| Cameras (snapshot, stream URL, record) | Covered | camera |

| MQTT (bounded topic listening, discovery/debug info, publish) | Covered | mqtt |

| Voice / Assist (utterance tests, pipelines and their debug runs, entity exposure, engines) | Covered | assist |

| Persons, zones, tags; user accounts (list, create, edit, delete — with owner/system guards); system general settings (name, location, units, time zone, currency, language, URLs) | Covered | admin |

| Labs features, analytics sharing | Covered | admin |

| YAML-only configuration (template/REST/command-line sensors, packages, themes) | Covered | yaml-config |

| External data stores (InfluxDB, Prometheus, ...) | Covered | external-sources |

| Weather forecasts (weather.get_forecasts) | Covered | service-call |

| Calendar Events (read / create / update / delete) | Covered | calendar |

| Custom events / known JSON webhooks | Covered (raw firing refused: automation.trigger) | service-call |

| Alarm / lock runtime control | Covered | service-call |

| To-do Lists (items + Local To-do lifecycle) | Covered | todo |

| Areas, floors, labels, categories (CRUD, entity category assignment), entity / device metadata | Covered | organize |

| Device replacement (re-point consumers), onboarding, retirement | Covered | device |

| Blueprints (import, save, instantiate, delete) | Covered | write |

| Energy (analysis + source/device config) | Covered | energy |

| Statistics repair / import / Purge / Entity registry remove | Covered | maintenance |

| Device deletion (integration-supported, HA 2026.9+) | Covered | organize |

| Integration onboarding (add / re-auth an integration via config flow) | Covered | integration-setup |

| Custom-integration configuration APIs — the integration's OWN endpoints (Alarmo, Scheduler, Frigate, ...) | Relay-Ready (reads only; changes: the integration's own panel in the UI) | this skill |

| Event capture — bounded window (a button's event, a short watch after an action) | Relay-Ready | this skill; mqtt for MQTT topics |

| Event streaming — continuous | Roadmap Phase 1c | -- |

| Backups (status, create, inspect, delete, automatic settings) | Covered | backup |

| Config snapshots (targeted capture/restore per item family) | Covered | the owning family skill (see ../ha-nova/config-snapshots.md) |

| Updates (pending, release notes, install, skip) | Covered | updates |

| Apps / Supervisor: store, install, uninstall, settings, auto-update, system and storage info (../updates/apps.md; start/stop/restart and host reboot: service-call; repositories, DNS, network, OS, and Supervisor settings stay in the HA UI: Settings > Apps, Settings > System) | Covered | updates |

| HACS (registration, download, version switching, uninstall, migration) | Covered | hacs |

| Marketplace (built-in HACS, Home Assistant 2026.11+): inventory; installs, updates, and removals as Home Assistant steps | Covered read-only | hacs |

| Zigbee / Z-Wave pairing and config | External | -- (pairing: not in HA NOVA yet, see below; MQTT-level inspection of a Zigbee2MQTT setup: mqtt) |

| Zigbee / Z-Wave network status (read-only device list / network reads) | Relay-Ready | this skill; Z2M bridge topics: mqtt |

| Alarm / lock code management (lock user codes, alarm PINs) | External | -- (Home Assistant UI; codes never enter chat) |

| Integration entry lifecycle (remove, reload, subentry add/reconfigure/rename/delete) | Covered | integration-setup |

| Integration entry options / reconfigure (standard config-entry flows) | Covered | integration-setup |

| Integration entry enable/disable, rename, system options, ignoring a discovery | Covered | integration-setup |

| Matter / Thread status (border router, datasets, node diagnostics) | Relay-Ready | this skill |

| Matter / Thread commissioning | External | -- (not in HA NOVA yet; the Home Assistant phone app, see below) |

| Assist custom sentences / intent scripts | Covered | assist (owning workflow; file mechanics stay in ../fallback/relay-ready.md) |

| Creating a calendar (the local_calendar integration) | Covered | integration-setup |

| Device category assignment | Not a Home Assistant surface | -- (devices carry no category; entity categories are organize) |

Rows classify the operation, not the integration's brand. Precedence: first a

row naming the operation itself (code management, helper families,

onboarding); then the surface the change would actually call — the

integration's own endpoints → custom-integration row; a standard config-entry

options/reconfigure flow → the integration-entry row even on a custom

integration, never the custom-API row; neither surface → External. Still

overlapping or unclear? Research the surface first, then take the least

permissive matching row (External over Relay-Ready).

Flow

1. Check Capability Map for user's request. A status may carry a qualifier
   after the canonical word ("Covered for the durable path") — branch on the
   canonical word and read the qualifier as scope, not as a new status.
2. If "Covered" -> STOP, use the listed skill instead
2a. If "Not a Home Assistant surface" -> the request rests on a wrong premise.
   Say what does not exist, name what the user probably meant, and hand off
   to the skill in the owner cell. Never research a payload for it: there is
   no endpoint to find, and searching produces a plausible-looking API that
   is not real.
3. If "Relay-Ready":
   a. FIRST: Search web using the provided Search query — understand current payload schema before any call
   b. Show experimental relay call examples informed by search results
   c. If the endpoint matches a row in Write Safety by Endpoint Type (below), classify it BEFORE drafting: full-document writes need read-merge-verify, never partial payloads. Endpoints the table does not cover split by where their schema comes from. For response-driven flows, submit exactly the fields the LIVE response named, never the fields the research step suggested — research is how you understand the flow, the response is what you answer. Standard config-entry flows belong to `integration-setup` or `helper`, blueprints to `write`. Other writes require a researched current schema and full-payload preview; never guess fields.
   d. Execute only after user confirms that exact preview (see `../ha-nova/confirmation.md` → Active Preview Confirmation)
4. If "Roadmap":
   a. Explain which phase and what blocks it
   b. Search web for manual workaround or alternative approach
   c. Suggest HA UI as interim solution
5. If "External":
   a. Explain why it's outside HA NOVA scope
   b. Search web for current best practice (how to do it directly in HA)
   c. Point to HA UI path

External storage becomes scannable only through a documented adapter (../ha-nova/consumer-discovery-preflight.md → Extension Adapter Contract) — never by ad-hoc parsing.

Web search is mandatory for Relay-Ready writes. The relay call examples below cover common read patterns, but write payloads change across HA versions. Always verify the current schema via web search before constructing a write payload.

Relay-Ready Features

Per-feature payloads, search queries and caveats live in

../fallback/relay-ready.md. Read it when the Capability Map row says

Relay-Ready; the Flow branch above still governs how to use them.

Roadmap Features

Event Subscriptions -- ROADMAP (Phase 1c)

Real-time event streams for state changes, automation triggers, and custom events.

Search: home assistant event subscription state_changed real time api 2026

Status: CONTINUOUS streams are Phase 1c, blocked by the absence of an SSE

endpoint. BOUNDED capture already works: wrap the subscription in a

collect_events envelope (max 100 events, max 10 s — ../ha-nova/relay-api.md

→ Bounded Event Collection) and the relay unsubscribes for you. That is enough

to answer "what event does this button fire" or to watch a short window after

an action; ha-nova:mqtt uses exactly this pattern.

Workaround for anything longer: an automation that reacts and notifies

(ha-nova:write), or polling GET /api/states/{entity_id}.

External Features

HACS (Home Assistant Community Store) -- COVERED

Owned by ha-nova:hacs (schema-guarded WS command map, reconcile loops,

consumer discovery, migration backup gate). Hand off there; never probe

hacs/* WS commands from this skill. Home Assistant 2026.11+ builds HACS in

as the Marketplace: hand off the same way (never probe marketplace/* here);

ha-nova:hacs reads its inventory and gives the Home Assistant steps for the

rest.

Zigbee / Z-Wave / Matter Pairing and Network Configuration -- EXTERNAL

HA NOVA doesn't pair radio devices yet (ZHA, Zigbee2MQTT, Z-Wave JS, Matter). Say exactly that; never claim pairing is impossible or needs special hardware access.

Alternative: in Home Assistant, Settings > Connectivity > Zigbee, Z-Wave, or Matter > Add device. Matter: do this in the Home Assistant phone app, close to the device (it uses Bluetooth). Zigbee2MQTT: in its own web interface, press Permit join (All).

Search: home assistant zigbee2mqtt zha zwave matter network configuration 2026

Error Handling

Experimental calls may fail with unfamiliar errors. Full relay/upstream error taxonomy: ../ha-nova/relay-api.md → Error Handling. Fallback-specific rules:

Output Format

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).

Every experimental call result carries the plain caution line where required and summarizes verified outcomes only.

Safety

Premise handling:

Rules for all experimental relay calls in this skill:

Write Safety by Endpoint Type

| Type | Behavior | Safe pattern | Examples |

|------|----------|-------------|----------|

| Full-document overwrite | Entire config replaced | Read → modify → save full document → read back and verify unrelated content survived | lovelace/config/save |

| Field-level list replace | Omitted keys preserved, provided keys fully replaced | Read existing list → append/modify → save full list → read back and verify pre-existing items survived | energy/save_prefs |

| Merge/patch | Only provided fields updated; a list field (labels, aliases) and an entity's options (one whole per-domain object) are replaced whole | Send only changed fields; read first and send the whole list or options object | config/area_registry/update, config/entity_registry/update |

| Delete | Irreversible for areas/zones/labels | Always search/related first; only as a ha-nova plan raw item, then ha-nova apply (the plan asks) | config/area_registry/delete, config/label_registry/delete (entity removal → ha-nova:maintenance) |

No HA WS endpoint has optimistic locking (no ETags, no version numbers). Last writer wins silently.

Anti-Patterns (never do this)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.