Area management
Areas in Home Assistant group your devices and entities the way your house does: the living room, the kitchen, the garden. Target an area, and you reach everything in it.
You set up areas in the UI, under Settings > Areas, labels & zones. Spook adds actions that do the same from an automation or script: create an area, change it, delete it, and move devices and entities in and out of it. Handy when a script sets up a fresh installation, or when a device moves around the house.
Spook also tells you about an area that has nothing in it at all. That one is on the Home Assistant page.

Actions
Spook adds ten actions for areas. You find them wherever you add an action, marked with a 👻. They change your setup: calling one by hand takes an administrator, while automations and scripts run them as usual.
Create an area
Adds a new area to Home Assistant.
The UI is the place to set up the rooms you have. This is for the areas a script or automation should make: setting up a new installation from a script, or creating the areas another system already knows about.
How to use it
- Open the automation or script that should create the area, and select Add action.
- Search for create an area, and select Home Assistant Core Integration: Create an area 👻.
- Fill in Name, like
Living room. - If you like, also set Icon.
- If you like, add Aliases: other names for the area, like
Lounge, that voice assistants understand too. Write them as a list, one per line starting with-. - Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Create an area 👻 |
| Action name | homeassistant.create_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
name | string | Yes | Living room |
icon | string | No | mdi:sofa |
aliases | string | list of strings | No | ["Lounge", "Sitting area"] |
Use aliases for an area with more than one name. For example, an area called "Living room" that you also want to call "Sitting area" or "Lounge". Assist and Google Assistant use these names.
A living room, with two other names voice assistants know it by:
action: homeassistant.create_area
data:
name: "Living room"
icon: "mdi:sofa"
aliases:
- "Lounge"
- "Sitting area"
- Home Assistant keeps area names unique. Creating an area with a name another area already has fails, also when only upper and lower case or spaces differ.
Update an area
Changes an area that already exists: its name, aliases, floor, icon, picture, labels, or its temperature and humidity sensors.
Deleting an area and creating it again takes every device and entity out of it. A lot to lose over an icon. This changes only what you give it, and keeps everything else as it was. So you can move an area to another floor without touching its name, or point it at a new temperature sensor after you replaced the old one.
How to use it
- Open the automation or script that should change the area, and select Add action.
- Search for update an area, and select Home Assistant Core Integration: Update an area 👻.
- Pick the area under Area ID.
- Turn on only the fields you want to change, like Name, Floor ID, Icon, Labels or Temperature sensor, and fill them in. Fields you leave off keep their value.
- Select Save.
The Aliases and Labels you give replace the ones the area has. To add or remove a single alias, use Add an alias to an area or Remove an alias from an area instead.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Update an area 👻 |
| Action name | homeassistant.update_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
area_id | string | Yes | living_room |
name | string | No | Living room |
aliases | string | list of strings | No | ["Lounge", "Sitting area"] |
floor_id | string or null | No | ground_floor |
icon | string or null | No | mdi:sofa |
picture | string or null | No | /local/living_room.jpg |
labels | string | list of strings | No | ["cozy"] |
temperature_entity_id | string or null | No | sensor.living_room_temperature |
humidity_entity_id | string or null | No | sensor.living_room_humidity |
Anything you leave out keeps the value it already has. Setting floor_id, icon, picture, temperature_entity_id or humidity_entity_id to null clears it. The aliases and labels you give replace the ones the area has, and an empty list removes them all.
Move the living room to the ground floor, and give it a sofa for an icon:
action: homeassistant.update_area
data:
area_id: "living_room"
floor_id: "ground_floor"
icon: "mdi:sofa"
- You need to give at least one thing to change. A call with only an
area_idis refused, so a misspelled field gives you an error. - The floor, labels and sensors you give have to exist, and the sensors have to measure temperature and humidity. Everything is checked before anything is written, so a refused call changes nothing.
- Renaming an area to a name another area already has is refused, since Home Assistant keeps area names unique. A different spelling of its own name, like other upper and lower case, is fine.
Delete an area
Removes an area from Home Assistant.
The other half of Create an area: an area a script made for a while can go again the same way. The devices and entities in it stay. They just are no longer in an area.
How to use it
- Open the automation or script that should delete the area, and select Add action.
- Search for delete an area, and select Home Assistant Core Integration: Delete an area 👻.
- Pick the area under Area ID.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Careful: that run deletes the area for real.

| Action properties | |
|---|---|
| Action | Delete an area 👻 |
| Action name | homeassistant.delete_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
area_id | string | Yes | living_room |
Not sure what the area_id of an area is? The area_id field also accepts templates. You can use this template to use the area's name instead:
area_id: "{{ area_id('Living room') }}"
That template finds the area ID of the area with the name "Living room".
Delete the living room:
action: homeassistant.delete_area
data:
area_id: "living_room"
The same, using the area's name instead of its ID:
action: homeassistant.delete_area
data:
area_id: "{{ area_id('Living room') }}"
Add an alias to an area
Adds one or more aliases to an area, and keeps the ones it already has.
Aliases are the other names an area goes by, and voice assistants listen for them. Adding one from an automation lets you make a name available only when it makes sense: "the guest room" while the guests are there, and gone again after with Remove an alias from an area.
How to use it
- Open the automation or script that should add the alias, and select Add action.
- Search for add an alias to an area, and select Home Assistant Core Integration: Add an alias to an area 👻.
- Pick the area under Area ID.
- Under Alias, write the name to add. For more than one, write them as a list, one per line starting with
-. - Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Add an alias to an area 👻 |
| Action name | homeassistant.add_alias_to_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
area_id | string | Yes | living_room |
alias | string | list of strings | Yes | ["Lounge", "Sitting area"] |
Not sure what the area_id of an area is? The area_id field also accepts templates. You can use this template to use the area's name instead:
area_id: "{{ area_id('Living room') }}"
That template finds the area ID of the area with the name "Living room".
Teach the living room two more names:
action: homeassistant.add_alias_to_area
data:
area_id: "living_room"
alias:
- "Lounge"
- "Sitting area"
The same, using the area's name instead of its ID:
action: homeassistant.add_alias_to_area
data:
area_id: "{{ area_id('Living room') }}"
alias:
- "Lounge"
- "Sitting area"
Remove an alias from an area
Removes one or more aliases from an area, and keeps the others.
The way back from Add an alias to an area. Voice assistants no longer answer to an alias that is gone.
How to use it
- Open the automation or script that should remove the alias, and select Add action.
- Search for remove an alias from an area, and select Home Assistant Core Integration: Remove an alias from an area 👻.
- Pick the area under Area ID.
- Under Alias, write the name to remove. For more than one, write them as a list, one per line starting with
-. - Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Remove an alias from an area 👻 |
| Action name | homeassistant.remove_alias_from_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
area_id | string | Yes | living_room |
alias | string | list of strings | Yes | ["Lounge", "Sitting area"] |
Not sure what the area_id of an area is? The area_id field also accepts templates. You can use this template to use the area's name instead:
area_id: "{{ area_id('Living room') }}"
That template finds the area ID of the area with the name "Living room".
Take two names away from the living room:
action: homeassistant.remove_alias_from_area
data:
area_id: "living_room"
alias:
- "Lounge"
- "Sitting area"
The same, using the area's name instead of its ID:
action: homeassistant.remove_alias_from_area
data:
area_id: "{{ area_id('Living room') }}"
alias:
- "Lounge"
- "Sitting area"
Set aliases for an area
Replaces all aliases of an area with the ones you give.
Adding and removing one at a time works until you lose track of what is there. This sets the area to exactly these names.
How to use it
- Open the automation or script that should set the aliases, and select Add action.
- Search for aliases for an area, and select Home Assistant Core Integration: Sets aliases for an area 👻.
- Pick the area under Area ID.
- Under Aliases, write every name the area should have, as a list, one per line starting with
-. Anything not on the list is removed. - Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Sets aliases for an area 👻 |
| Action name | homeassistant.set_area_aliases |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
area_id | string | Yes | living_room |
aliases | string | list of strings | Yes | ["Lounge", "Sitting area"] |
Not sure what the area_id of an area is? The area_id field also accepts templates. You can use this template to use the area's name instead:
area_id: "{{ area_id('Living room') }}"
That template finds the area ID of the area with the name "Living room".
Give the living room exactly these two other names:
action: homeassistant.set_area_aliases
data:
area_id: "living_room"
aliases:
- "Lounge"
- "Sitting area"
The same, using the area's name instead of its ID:
action: homeassistant.set_area_aliases
data:
area_id: "{{ area_id('Living room') }}"
aliases:
- "Lounge"
- "Sitting area"
Add a device to an area
Puts one or more devices in an area. The other devices in that area stay where they are.
A device is in one area at most, so a device that was in another area moves. Think of the speaker you carry from the kitchen to the garden, or the space heater that follows you around the house in winter: tell Home Assistant where it is now, and "turn off everything in the kitchen" no longer reaches it.
How to use it
- Open the automation or script that should move the device, and select Add action.
- Search for add a device to an area, and select Home Assistant Core Integration: Add a device to an area 👻.
- Pick the area under Area ID.
- Pick one or more devices under Device ID.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Add a device to an area 👻 |
| Action name | homeassistant.add_device_to_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
area_id | string | Yes | living_room |
device_id | string | list of strings | Yes | dc23e666e6100f184e642a0ac345d3eb |
Not sure what the area_id of an area is? The area_id field also accepts templates. You can use this template to use the area's name instead:
area_id: "{{ area_id('Living room') }}"
That template finds the area ID of the area with the name "Living room".
Not sure what the device_id of your device is? There are a few ways to find it:
Use this action in the Actions tool: pick the device in the UI, and select Go to YAML mode. The YAML shows the device ID.
Or open the device page in the UI and look at the URL. The device ID is the last part of it, and looks something like this: dc23e666e6100f184e642a0ac345d3eb.
Put a device in the living room:
action: homeassistant.add_device_to_area
data:
area_id: "living_room"
device_id: "dc23e666e6100f184e642a0ac345d3eb"
The same, using the area's name instead of its ID:
action: homeassistant.add_device_to_area
data:
area_id: "{{ area_id('Living room') }}"
device_id: "dc23e666e6100f184e642a0ac345d3eb"
More than one device at once, as a list:
action: homeassistant.add_device_to_area
data:
area_id: "living_room"
device_id:
- "dc23e666e6100f184e642a0ac345d3eb"
- "df98a97c9341a0f184e642a0ac345d3b"
Remove a device from an area
Takes one or more devices out of the area they are in. The other devices in that area stay where they are.
The device itself stays, with all its entities. It just is no longer in an area. You don't say which area: a device is in one area at most, so Spook knows.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for remove a device from an area, and select Home Assistant Core Integration: Remove a device from an area 👻.
- Pick one or more devices under Device ID.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Remove a device from an area 👻 |
| Action name | homeassistant.remove_device_from_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
device_id | string | list of strings | Yes | dc23e666e6100f184e642a0ac345d3eb |
While this action is about areas, it does not need an area ID. A device can only be in one area at a time, so it is taken out of the area it is in.
Not sure what the device_id of your device is? There are a few ways to find it:
Use this action in the Actions tool: pick the device in the UI, and select Go to YAML mode. The YAML shows the device ID.
Or open the device page in the UI and look at the URL. The device ID is the last part of it, and looks something like this: dc23e666e6100f184e642a0ac345d3eb.
Take a device out of its area:
action: homeassistant.remove_device_from_area
data:
device_id: "dc23e666e6100f184e642a0ac345d3eb"
More than one device at once, as a list:
action: homeassistant.remove_device_from_area
data:
device_id:
- "dc23e666e6100f184e642a0ac345d3eb"
- "df98a97c9341a0f184e642a0ac345d3b"
Add an entity to an area
Puts one or more entities in an area. The other entities in that area stay where they are.
An entity normally sits in the area of its device. This puts it somewhere else, and that wins over the area of its device. Handy for the smart plug in the kitchen that powers the lamp in the hallway: the plug is a kitchen device, but the light it switches belongs in the hallway.
How to use it
- Open the automation or script that should move the entity, and select Add action.
- Search for add an entity to an area, and select Home Assistant Core Integration: Add an entity to an area 👻.
- Pick the area under Area ID.
- Pick one or more entities under Entity ID.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Add an entity to an area 👻 |
| Action name | homeassistant.add_entity_to_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
area_id | string | Yes | living_room |
entity_id | string | list of strings | Yes | light.spotlight |
Not sure what the area_id of an area is? The area_id field also accepts templates. You can use this template to use the area's name instead:
area_id: "{{ area_id('Living room') }}"
That template finds the area ID of the area with the name "Living room".
Put the spotlight in the living room:
action: homeassistant.add_entity_to_area
data:
area_id: "living_room"
entity_id: light.spotlight
The same, using the area's name instead of its ID:
action: homeassistant.add_entity_to_area
data:
area_id: "{{ area_id('Living room') }}"
entity_id: light.spotlight
More than one entity at once, as a list:
action: homeassistant.add_entity_to_area
data:
area_id: "living_room"
entity_id:
- light.spotlight
- light.ceiling
Remove an entity from an area
Takes one or more entities out of the area they were put in. The other entities in that area stay where they are.
This undoes Add an entity to an area. An entity that belongs to a device goes back to sitting in the area of that device, so it can end up in the same area as before. Only an entity without a device, or whose device is in no area, ends up in no area at all.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for remove an entity from an area, and select Home Assistant Core Integration: Remove an entity from an area 👻.
- Pick one or more entities under Entity ID.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Remove an entity from an area 👻 |
| Action name | homeassistant.remove_entity_from_area |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | light.spotlight |
While this action is about areas, it does not need an area ID. An entity can only be in one area at a time, so it is taken out of the area it is in.
Take the spotlight out of its area:
action: homeassistant.remove_entity_from_area
data:
entity_id: light.spotlight
More than one entity at once, as a list:
action: homeassistant.remove_entity_from_area
data:
entity_id:
- light.spotlight
- light.ceiling
Blueprints & tutorials
There are no known blueprints or tutorials for these actions yet. Made one, or found one? Let us know in our discussion forums.
Feature requests, ideas, and support
Got an idea to take this further, like a new action, entity or repair? Let us know in our discussion forums.
Stuck, or found a bug? The Support page tells you where to go for help.











