Create label
labels_create_labelCreate a Home Assistant label to tag entities or devices. Pass a name plus optional icon, color, or description; returns the created label ID and details.
Instructions
Create a new label.
Calls WS config/label_registry/create with name and any of icon,
color and description you pass; Home Assistant assigns a new
label_id, so calling this twice with the same name creates two separate
labels.
Use when: you need a new label to tag entities or devices with.
Returns: the created label registry dict (label_id, name, icon, color,
description).
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:alert'; omit for no icon. | |
| name | Yes | Display name for the new label, e.g. 'Battery Low'. | |
| color | No | Optional label color name recognised by the frontend, e.g. 'red'; omit for no color. | |
| description | No | Optional free-text description of the label's purpose; omit for none. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||