Create or Update Category
ha_config_set_categoryCreate or update a domain-scoped Home Assistant category to organize automations, scripts, scenes, or helpers.
Instructions
Create or update a Home Assistant category.
Creates a new category if category_id is not provided, or updates an existing category if category_id is provided.
Categories are domain-scoped organizational groups for automations, scripts, scenes, and helpers. Unlike labels (which are cross-domain), categories are specific to a single domain scope.
EXAMPLES:
Create automation category: ha_config_set_category("Lighting", scope="automation")
Create with icon: ha_config_set_category("Security", scope="automation", icon="mdi:shield")
Update category: ha_config_set_category("Updated Name", scope="automation", category_id="my_category_id")
After creating a category, use ha_set_entity(categories={"automation": "category_id"}) to assign it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Material Design Icon (e.g., 'mdi:tag', 'mdi:label') | |
| name | Yes | Display name for the category | |
| scope | Yes | Domain scope for the category (e.g., 'automation', 'script', 'scene', 'helpers'). | |
| category_id | No | Category ID for updates. If not provided, creates a new category. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||