Core extensions

Area management

Spook adds actions to create, change and delete areas in Home Assistant from your automations and scripts, and to move devices and entities in and out of them.

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.

The Add action dialog, searched for area, with the actions Spook adds marked with a ghost.
Search for area when you add an action: Spook's actions have the 👻.

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

  1. Open the automation or script that should create the area, and select Add action.
  2. Search for create an area, and select Home Assistant Core Integration: Create an area 👻.
  3. Fill in Name, like Living room.
  4. If you like, also set Icon.
  5. 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 - .
  6. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Create an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should change the area, and select Add action.
  2. Search for update an area, and select Home Assistant Core Integration: Update an area 👻.
  3. Pick the area under Area ID.
  4. 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.
  5. 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.

The Actions tool with Update an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should delete the area, and select Add action.
  2. Search for delete an area, and select Home Assistant Core Integration: Delete an area 👻.
  3. Pick the area under Area ID.
  4. 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.

The Actions tool with Delete an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should add the alias, and select Add action.
  2. Search for add an alias to an area, and select Home Assistant Core Integration: Add an alias to an area 👻.
  3. Pick the area under Area ID.
  4. Under Alias, write the name to add. For more than one, write them as a list, one per line starting with - .
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Add an alias to an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should remove the alias, and select Add action.
  2. Search for remove an alias from an area, and select Home Assistant Core Integration: Remove an alias from an area 👻.
  3. Pick the area under Area ID.
  4. Under Alias, write the name to remove. For more than one, write them as a list, one per line starting with - .
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Remove an alias from an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should set the aliases, and select Add action.
  2. Search for aliases for an area, and select Home Assistant Core Integration: Sets aliases for an area 👻.
  3. Pick the area under Area ID.
  4. Under Aliases, write every name the area should have, as a list, one per line starting with - . Anything not on the list is removed.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Sets aliases for an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should move the device, and select Add action.
  2. Search for add a device to an area, and select Home Assistant Core Integration: Add a device to an area 👻.
  3. Pick the area under Area ID.
  4. Pick one or more devices under Device ID.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Add a device to an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should do this, and select Add action.
  2. Search for remove a device from an area, and select Home Assistant Core Integration: Remove a device from an area 👻.
  3. Pick one or more devices under Device ID.
  4. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Remove a device from an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should move the entity, and select Add action.
  2. Search for add an entity to an area, and select Home Assistant Core Integration: Add an entity to an area 👻.
  3. Pick the area under Area ID.
  4. Pick one or more entities under Entity ID.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Add an entity to an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should do this, and select Add action.
  2. Search for remove an entity from an area, and select Home Assistant Core Integration: Remove an entity from an area 👻.
  3. Pick one or more entities under Entity ID.
  4. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Remove an entity from an area 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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.