← ClaudeAtlas

ha-integration-events-addlisted

Augments an existing Home Assistant Custom Integration with event firing and/or listening on the HA event bus, conforming to spec/ha/integration-events. For firing it generates hass.bus.async_fire("<domain>_event", event_data) with a domain-prefixed event type and a documented JSON-serializable data shape, placed in async_setup_entry (__init__.py) and never in entity logic. For listening it generates hass.bus.async_listen / async_listen_once, holds the returned unsubscribe callable, registers it via entry.async_on_unload (or tears it down in async_unload_entry), and decorates non-blocking listeners with @callback. Decides fire vs. listen vs. both with the user first and runs an event-vs-state check. Activate on "fire a custom event", "listen for an event", "feuere/lausche ein Integration-Event". Do not activate for registered services (ha-service-definition-add), device triggers off events (ha-device-automation-add), greenfield scaffolding (ha-integration-scaffold), or deploying to a live HA instance.
nolte/claude-home-assistant · ★ 1 · AI & Automation · score 68
Install: claude install-skill nolte/claude-home-assistant
# HA Integration Events Add Spec: `spec/claude/ha-integration-events-add/en.md` (EN canonical) / `spec/claude/ha-integration-events-add/de.md` (DE translation). ## Why this is a skill, not an agent - **Human-visible augmentation surface** — the user describes an occurrence and reads back the `async_fire` call, the documented data shape, the listener wiring, and the conformance report; a skill keeps this on the visible command surface, like the sibling augment skills (`ha-config-flow-augment`, `ha-coordinator-add`, `ha-device-automation-add`). - **Mid-flow interactivity** — the fire-vs-listen-vs-both decision and the event-vs-state check are per-run dialogues the user approves before generation. - **Bounded, inline generation** — a bus-fire call plus a documented data shape, or a listener with its `async_on_unload` teardown, fit inline; no isolated agent context is needed. - Counter-dimension considered: the draft→validate loop could be an agent, but the direction decision and the event-vs-state advice belong in the user's working context; skill wins. ## When this skill activates Use this skill to add event **firing** and/or **listening** to an existing integration — firing a domain-prefixed custom event when a transient occurrence happens, or subscribing to a bus event with clean unsubscribe teardown. ## When NOT to activate - a user-driven action with its own schema → `ha-service-definition-add` / `ha/services` - a device trigger built on top of a fired event → `ha-de