Organize

From markusleben/ha-nova · View interactive version

Organize is an AI agent skill from the GitHub repository markusleben/ha-nova. Use when organizing Home Assistant areas, floors, labels, categories, and entity/device metadata, or deleting a device, through HA NOVA Relay.

How to use this skill

Skill file

HA NOVA Organize

Scope

Organization and registry metadata only:

Device categories do not exist; offer entity categories instead.

Not in scope:

Hand off per line; anything else goes to ha-nova:fallback.

Bootstrap (once per session)

Read and follow ../ha-nova/session-bootstrap.md.

Relay Contract

File-based WS requests only: ha-nova relay ws --data-file <payload-file>, --out <result-file> for large results; deletes and entity, device, or area updates only as ha-nova plan raw --file <requests.json> items, then ha-nova apply.

Registry commands owned here:

Flow

  1. Resolve the exact target type and identity.
  1. If multiple candidates remain, ask one blocking question.
  2. For create/update:
  1. For delete:
  1. Execute exactly one mutation (or the confirmed batch manifest or grouped change set per ../ha-nova/grouped-change-set.md, sequentially).
  2. Read back and verify the requested fields:
  1. Report the final state.

Bulk Target Resolution

For a SET selected by prefix, domain, area, or label, save before previewing, and resolve the shortlist per ../ha-nova/bulk-patterns.md (Selector Semantics + Discovery Pipeline); device shortlists use config/device_registry/list, not .data.entity. The manifest binds to that exact saved id list — never to the raw selector.

Entity / Device Update Fields

Exposed metadata fields only:

Refused here: disabling or enabling a lock, alarm panel, or cover; a device with a lock, alarm panel, or access cover, or a child device with one (disabled with it); or a switch whose device has a switch_as_x one (registry platform: switch_as_x). Say so before any preview; point at Settings > Devices & services.

Re-ENABLING a registry-disabled item depends on WHO disabled it (disabled_by): "user" or "integration" (disabled by default) → the write {"disabled_by": null} on the entity record; "device" → the entity follows its parent — re-enable the DEVICE record ({"disabled_by": null} on the device registry entry, same preview/consumer rules as a device-level disable), never the entity alone; "config_entry" (the integration is disabled) → enable the integration itself (ha-nova:integration-setup), never the entity. Then read the response: require_restart: true → it appears after a restart; reload_delay: <seconds> → after ~that delay; never actuate the freshly enabled entity from this skill.

Two or more renames: ../ha-nova/safe-refactoring.md → Rename Scheme, not this. new_entity_id and disabled_by are NOT low-risk metadata: a rename or disable breaks every automation, scene, script, dashboard, and template that references the entity. Before either, run WS search/related on the entity — for a DEVICE-level disabled_by, expand the device to its entities first (entity registry by device_id, child devices' too) and run search/related per entity, because the device relation itself does not collect the child entities' consumers — and name the union of consumers in the preview — and say that it covers automations, scripts, groups, persons, and scenes only, not templates or dashboards (ha-nova get <entity_id> --references reads those too). After a rename, offer to update the found consumers through their owning skills. Before either write, capture the auto config snapshot of the record actually being mutated — the entity's registry fields for a rename/entity disable, the DEVICE registry record for a device-level disabled_by (category metadata, ../ha-nova/config-snapshots.md; on capture failure follow its capture-failure stop). For a RENAME, store the target new_entity_id with the old record: restore finds it under the new id and renames it back; otherwise restore writes the fields back in place.

Delete a Device

HA 2026.9+ (get_config; older: Settings > Devices & services); the owning entry (config_entries/get) needs supports_remove_device: true. Refused as for a device disable; also HA NOVA's App. Preview the device, child devices (parent_device_id), their entities (same entry and subentry: deleted; others: unlinked), and consumers: search/related per device and entity. One ha-nova plan raw --file <requests.json>: a backups save (metadata, ../ha-nova/config-snapshots.md: full device and entity registry rows), then {"endpoint":"ws","payload":{"type":"config/device_registry/remove","device_id":"<id>"}}; ha-nova apply per its next_step. Unsupported or refused: offer the HA UI or removing its integration entry (ha-nova:fallback, own preview: all its devices go). No undo (the copy is a record only); offer ha-nova:backup first. Verify it is gone.

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

Use stable localized slot labels in this order; omit empty slots.

Metadata reads render the Report shape; registry inventories render the List Frame (output-cards.md). Default to a compact field summary.

Safety

Guardrails

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.