Create category
labels_create_categoryCreate a category in a Home Assistant registry scope to group items such as automations. Supply scope and name, plus an optional MDI icon, to get the created category registry entry.
Instructions
Create a category within a registry scope.
Calls WS config/category_registry/create with scope and name,
plus icon if given; Home Assistant assigns a new category_id, so
calling this twice with the same name creates two separate categories.
Use when: you need a new category to group items within one scope, e.g.
automations.
Returns: the created category registry dict.
Errors: on a WS failure, returns {"error": "<message>"} instead of
raising.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Optional mdi icon identifier, e.g. 'mdi:tag'; omit for no icon. | |
| name | Yes | Display name for the new category. | |
| scope | Yes | Registry scope the new category belongs to, e.g. 'automation'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||