Create or Update Label
ha_config_set_labelCreate or update a label in Home Assistant to tag and organize entities, devices, and areas for better management and automation.
Instructions
Create or update a Home Assistant label.
Creates a new label if label_id is not provided, or updates an existing label if label_id is provided.
Labels are a flexible tagging system that can be applied to entities, devices, and areas for organization and automation purposes.
EXAMPLES:
Create simple label: ha_config_set_label("Critical")
Create colored label: ha_config_set_label("Outdoor", color="green")
Create label with icon: ha_config_set_label("Battery Powered", icon="mdi:battery")
Create full label: ha_config_set_label("Security", color="red", icon="mdi:shield", description="Security-related devices")
Update label: ha_config_set_label("Updated Name", label_id="my_label_id", color="blue")
After creating a label, use ha_set_entity(labels=["label_id"]) to assign it to entities.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Material Design Icon (e.g., 'mdi:tag', 'mdi:label') | |
| name | Yes | Display name for the label | |
| color | No | Color for the label (e.g., 'red', 'blue', 'green', or hex like '#FF5733') | |
| label_id | No | Label ID for updates. If not provided, creates a new label. | |
| description | No | Description of the label's purpose |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||