# Ha Registry

> Manage Home Assistant areas, devices, entities, floors, and labels with hass-cli. Use to list/create/rename/delete areas, assign devices or entities to areas, organize with floors and labels, rename entity_ids, or audit the registry. These are WebSocket-only operations (config/*_registry/*).

- Skill: `beclab/ha-registry` (Agent Skill)
- Install (CLI): `npx skillmds@latest add beclab/ha-registry`
- Raw SKILL.md: https://api.skillmd.com/api/skills/beclab/ha-registry/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: beclab (https://skillmd.com/u/beclab)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/beclab/ha-registry

---


# ha-registry

Organize the home: areas, devices, entities, floors, labels. **Prerequisite:**
[`../ha-shared/SKILL.md`](../ha-shared/SKILL.md).

> All registry operations are WebSocket-only. hass-cli routes them
> automatically; you do not pick the transport.

## List

```bash
hass-cli registry area list
hass-cli registry device list
hass-cli registry entity list
hass-cli registry floor list
hass-cli registry label list
```

## Mutate

`create` takes only `--data` (the new entry's fields). `update` and `delete`
take the entry **id as a positional argument** — the CLI injects it as the
correct `<kind>_id` key for you. Extra `--data` fields are merged in.

```bash
# Create an area (id is derived from the name by HA)
hass-cli registry area create --data '{"name":"Garage"}'

# Rename an area (positional id -> area_id)
hass-cli registry area update garage --data '{"name":"Garage Bay"}'

# Assign a device to an area
hass-cli registry device update <device_id> --data '{"area_id":"garage"}'

# Move an entity to an area / rename it
hass-cli registry entity update light.x --data '{"area_id":"garage","name":"Bay Light"}'

# Delete
hass-cli registry area delete garage
```

> `--data` also accepts `@file.json`; on PowerShell prefer that over inline JSON
> (see ha-shared for the quoting note).

## Categories (scoped)

Categories group items within a scope (e.g. `automation`, `script`, `scene`).
Unlike the other registries, every call needs `--scope`:

```bash
hass-cli registry category list   --scope automation
hass-cli registry category create --scope automation --data '{"name":"Lighting"}'
hass-cli registry category update <category_id> --scope automation --data '{"name":"Lights","icon":"mdi:lightbulb"}'
hass-cli registry category delete <category_id> --scope automation
```

Assign an automation to a category by setting its `categories` via the entity
registry: `hass-cli registry entity update automation.x --data '{"categories":{"automation":"<category_id>"}}'`.

## Tips

- Get ids first via the matching `list`. Names are not ids.
- Entity/device area assignment: an entity inherits its device's area unless
  given its own `area_id`.
- For fields you are unsure about, inspect the frontend behavior or use
  `hass-cli raw ws config/entity_registry/get --data '{"entity_id":"..."}'`.

