Labels
Labels cut across rooms: battery powered, holiday lights, rental-guest accessible, critical. Home Assistant can target a whole label in one service call.
Unlike Spook’s six single-target label services, add_label and remove_label take entities, devices, and areas in the same call.
Create label
brain.create_label
Create a new label. Returns the new label_id as response data.
| Field | Type | Required | Description |
|---|---|---|---|
name | text | yes | Name of the new label. |
icon | icon | no | Icon for the label. |
color | text | no | Label color: a theme color name (e.g. red, blue, amber) or hex code. |
description | text | no | What this label is for. |
service: brain.create_labeldata: name: Battery powered icon: mdi:battery color: amber🗣️ “Create an amber ‘Battery powered’ label.”
Rename label
brain.rename_label
Rename an existing label. Everything carrying it keeps it.
| Field | Type | Required | Description |
|---|---|---|---|
label_id | label | yes | The label to rename. |
name | text | yes | The new name. |
service: brain.rename_labeldata: label_id: battery_powered name: Battery🗣️ “Rename the ‘Battery powered’ label to just ‘Battery’.”
Update label
brain.update_label
Change a label’s icon, colour, or description — use rename_label for the name. Pass at least one field; anything you leave out is left as it is.
| Field | Type | Required | Description |
|---|---|---|---|
label_id | label | yes | The label to update. |
icon | icon | no | The new icon, e.g. mdi:lightbulb. |
color | text | no | A theme color name (primary, red, green, …) or a hex color. |
description | text | no | What the label is for. |
service: brain.update_labeldata: label_id: battery_powered color: red description: Anything that runs on a battery and needs watching🗣️ “Make the battery label red and say what it’s for.”
Delete label
brain.delete_label
Delete a label. It is removed from everything it was applied to.
| Field | Type | Required | Description |
|---|---|---|---|
label_id | label | yes | The label to delete. |
service: brain.delete_labeldata: label_id: battery_powered🗣️ “Delete the battery-powered label everywhere.”
Add label
brain.add_label
Apply one or more labels to entities, devices, and/or areas. At least one target is required.
| Field | Type | Required | Description |
|---|---|---|---|
label_id | label (list) | yes | Labels to apply. |
entity_id | entity (list) | no | Entities to label. |
device_id | device (list) | no | Devices to label. |
area_id | area (list) | no | Areas to label. |
service: brain.add_labeldata: label_id: [battery_powered] entity_id: - sensor.front_door_battery - sensor.motion_battery device_id: - a1b2c3d4e5f6🗣️ “Label every battery-powered sensor in the house ‘Battery powered’.”
Remove label
brain.remove_label
Remove one or more labels from entities, devices, and/or areas. At least one target is required.
| Field | Type | Required | Description |
|---|---|---|---|
label_id | label (list) | yes | Labels to remove. |
entity_id | entity (list) | no | Entities to unlabel. |
device_id | device (list) | no | Devices to unlabel. |
area_id | area (list) | no | Areas to unlabel. |
service: brain.remove_labeldata: label_id: [battery_powered] entity_id: - sensor.motion_battery🗣️ “That motion sensor is wired now — drop its battery label.”