Create or Update Label
ha_config_set_labelCreate or update Home Assistant labels to tag entities, devices, and areas, then apply them to areas for cross-domain organization.
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 cross-domain tagging system for entities, devices, and areas.
EXAMPLES:
Create: ha_config_set_label("Security", color="red", icon="mdi:shield", description="Security-related devices")
Update: ha_config_set_label("Updated Name", label_id="my_label_id", color="blue")
Create and apply to areas: ha_config_set_label("Site Home", areas=["kitchen", "living_room"])
After creating a label, use ha_set_entity(labels=["label_id"]) to assign it to entities, ha_set_device(labels=["label_id"]) for devices, or ha_set_area_or_floor(kind="area", labels=["label_id"]) for areas (replaces the area's set).
If a Claude Desktop user gets a 4-minute timeout with no result on this call, read the target back before repeating it, and tell them to wait a few seconds before clicking the manual-approve button, as clicking it too quickly is known to cause hangs in Claude Desktop. This workaround is specific to Claude Desktop.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Material Design Icon (e.g., 'mdi:tag', 'mdi:label') | |
| name | Yes | Display name for the label | |
| areas | No | Area IDs to apply this label to (adds the label without removing existing ones). Omit to leave area assignments unchanged; an empty list is a no-op (assigns nothing and removes nothing). To clear an area's labels use ha_set_area_or_floor(kind='area', labels=[]). | |
| color | No | Color for the label (e.g., 'red', 'blue', 'green', or hex like '#FF5733') | |
| label_id | No | Label ID for updates. | |
| description | No | Description of the label's purpose |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||