Skip to content

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.

FieldTypeRequiredDescription
nametextyesName of the new label.
iconiconnoIcon for the label.
colortextnoLabel color: a theme color name (e.g. red, blue, amber) or hex code.
descriptiontextnoWhat this label is for.
service: brain.create_label
data:
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.

FieldTypeRequiredDescription
label_idlabelyesThe label to rename.
nametextyesThe new name.
service: brain.rename_label
data:
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.

FieldTypeRequiredDescription
label_idlabelyesThe label to update.
iconiconnoThe new icon, e.g. mdi:lightbulb.
colortextnoA theme color name (primary, red, green, …) or a hex color.
descriptiontextnoWhat the label is for.
service: brain.update_label
data:
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.

FieldTypeRequiredDescription
label_idlabelyesThe label to delete.
service: brain.delete_label
data:
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.

FieldTypeRequiredDescription
label_idlabel (list)yesLabels to apply.
entity_identity (list)noEntities to label.
device_iddevice (list)noDevices to label.
area_idarea (list)noAreas to label.
service: brain.add_label
data:
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.

FieldTypeRequiredDescription
label_idlabel (list)yesLabels to remove.
entity_identity (list)noEntities to unlabel.
device_iddevice (list)noDevices to unlabel.
area_idarea (list)noAreas to unlabel.
service: brain.remove_label
data:
label_id: [battery_powered]
entity_id:
- sensor.motion_battery

🗣️ “That motion sensor is wired now — drop its battery label.”