---
title: "Floor management"
description: "Spook adds actions to create, change and delete floors in Home Assistant from your automations and scripts, and to manage their aliases and areas."
canonical_url: "https://spook.boo/floors"
---
# Floor management

> Spook adds actions to create, change and delete floors in Home Assistant from your automations and scripts, and to manage their aliases and areas.

Floors in Home Assistant group your areas the way your house does: the ground floor, the first floor, the attic. They give a better overview of your home, and you can target actions at a whole floor at once, like turning off all the lights upstairs.

You set up floors in the UI, under **Settings** > **Areas, labels & zones**. Spook adds actions that do the same from an automation or script: create a floor, change it, delete it, and move areas on and off it. Handy when a script sets up a fresh installation, or when floors should follow another system.

Spook also tells you about a floor that has no areas on it at all. That one is on the [Home Assistant page](https://spook.boo/homeassistant#empty-floors).

![The Add action dialog, searched for floor, with the actions Spook adds marked with a ghost.](https://spook.boo/images/screenshots/en/light/actions-search-floor.webp)

Search for floor when you add an action: Spook's actions have the 👻.

## Actions

Spook adds eight actions for floors. 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 a floor

Adds a new floor to Home Assistant.

The UI is the place to set up the floors you have. This is for the floors a script or automation should make: setting up a new installation from a script, or building a floor plan that another system already knows about.

**How to use it**

1. Open the automation or script that should create the floor, and select **Add action**.
2. Search for **create a floor**, and select **Home Assistant Core Integration: Create a floor 👻**.
3. Fill in **Name**, like `First floor`.
4. If you like, also set **Icon** and **Level**. The level is the number of the floor, `0` for the ground floor.
5. If you like, add **Aliases**: other names for the floor, like `Downstairs`, that Assist understands too. Write them as a list, one per line starting with `- `.
6. Select **Save**.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.create_floor) opens it in your Home Assistant, ready to run once.

![The Actions tool with Create a floor 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-create-floor.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Create a floor 👻 |
| Action name | `homeassistant.create_floor` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.create_floor) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.create_floor) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `name` | string | Yes | `First floor` |
| `icon` | string | No | `mdi:floor-1` |
| `level` | integer | No | `1` |
| `aliases` | string \| list of strings | No | `["ground floor", "downstairs"]` |

Use `aliases` for a floor with more than one name. For example, a floor called "First floor" that you also want to call "Ground floor" or "Downstairs". Assist uses these names.

**Example actions in YAML**

A ground floor, with two other names Assist knows it by:

```yaml
action: homeassistant.create_floor
data:
  name: "First floor"
  icon: "mdi:floor-1"
  level: 1
  aliases:
    - "Ground floor"
    - "Downstairs"
```

**Known limitations**

- Home Assistant keeps floor names unique. Creating a floor with a name another floor already has fails, also when only upper and lower case or spaces differ.

### Update a floor

Changes the name, aliases, icon or level of a floor that already exists.

Deleting a floor and creating it again takes every area off 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 change the icon without touching the name or the level.

**How to use it**

1. Open the automation or script that should change the floor, and select **Add action**.
2. Search for **update a floor**, and select **Home Assistant Core Integration: Update a floor 👻**.
3. Pick the floor under **Floor ID**.
4. Turn on only the fields you want to change, like **Name**, **Aliases**, **Icon** or **Level**, and fill them in. Fields you leave off keep their value.
5. Select **Save**.

The **Aliases** you give replace the ones the floor has. To add or remove a single alias, use [Add an alias to a floor](#add-an-alias-to-a-floor) or [Remove an alias from a floor](#remove-an-alias-from-a-floor) instead.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.update_floor) opens it in your Home Assistant, ready to run once.

![The Actions tool with Update a floor 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-update-floor.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Update a floor 👻 |
| Action name | `homeassistant.update_floor` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.update_floor) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.update_floor) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `floor_id` | string | Yes | `first_floor` |
| `name` | string | No | `Ground floor` |
| `aliases` | string \| list of strings | No | `["downstairs"]` |
| `icon` | string or `null` | No | `mdi:home-floor-g` |
| `level` | integer or `null` | No | `0` |

Anything you leave out keeps the value it already has. Setting `icon` or `level` to `null` clears it. The `aliases` you give replace the ones the floor has, and an empty list removes them all.

**Example actions in YAML**

Rename the first floor, and make it level 0:

```yaml
action: homeassistant.update_floor
data:
  floor_id: "first_floor"
  name: "Ground floor"
  level: 0
```

**Known limitations**

- You need to give at least one thing to change. A call with only a `floor_id` is refused, so a misspelled field gives you an error.
- Renaming a floor to a name another floor already has is refused, since Home Assistant keeps floor names unique. A different spelling of its own name, like other upper and lower case, is fine.

### Delete a floor

Removes a floor from Home Assistant.

The other half of [Create a floor](#create-a-floor): a floor a script made for a while can go again the same way. The areas on it stay. They just no longer sit on a floor.

**How to use it**

1. Open the automation or script that should delete the floor, and select **Add action**.
2. Search for **delete a floor**, and select **Home Assistant Core Integration: Delete a floor 👻**.
3. Pick the floor under **Floor ID**.
4. Select **Save**.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.delete_floor) opens it in your Home Assistant, ready to run once. Careful: that run deletes the floor for real.

![The Actions tool with Delete a floor 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-delete-floor.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Delete a floor 👻 |
| Action name | `homeassistant.delete_floor` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.delete_floor) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.delete_floor) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `floor_id` | string | Yes | `first_floor` |

**Getting a floor ID from a floor name**

Not sure what the `floor_id` of a floor is? The `floor_id` field also accepts templates. You can use this template to use the floor's name instead:

```yaml
floor_id: "{{ floor_id('First floor') }}"
```

That template finds the floor ID of the floor with the name "First floor".

**Example actions in YAML**

Delete the first floor:

```yaml
action: homeassistant.delete_floor
data:
  floor_id: "first_floor"
```

The same, using the floor's name instead of its ID:

```yaml
action: homeassistant.delete_floor
data:
  floor_id: "{{ floor_id('First floor') }}"
```

### Add an alias to a floor

Adds one or more aliases to a floor, and keeps the ones it already has.

Aliases are the other names a floor 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 party floor" during the party, and gone again the next morning with [Remove an alias from a floor](#remove-an-alias-from-a-floor).

**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 a floor**, and select **Home Assistant Core Integration: Add an alias to a floor 👻**.
3. Pick the floor under **Floor 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](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_alias_to_floor) opens it in your Home Assistant, ready to run once.

![The Actions tool with Add an alias to a floor 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-add-alias-to-floor.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Add an alias to a floor 👻 |
| Action name | `homeassistant.add_alias_to_floor` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_alias_to_floor) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_alias_to_floor) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `floor_id` | string | Yes | `first_floor` |
| `alias` | string \| list of strings | Yes | `["Ground floor", "Downstairs"]` |

**Getting a floor ID from a floor name**

Not sure what the `floor_id` of a floor is? The `floor_id` field also accepts templates. You can use this template to use the floor's name instead:

```yaml
floor_id: "{{ floor_id('First floor') }}"
```

That template finds the floor ID of the floor with the name "First floor".

**Example actions in YAML**

Teach the first floor two more names:

```yaml
action: homeassistant.add_alias_to_floor
data:
  floor_id: "first_floor"
  alias:
    - "Ground floor"
    - "Downstairs"
```

The same, using the floor's name instead of its ID:

```yaml
action: homeassistant.add_alias_to_floor
data:
  floor_id: "{{ floor_id('First floor') }}"
  alias:
    - "Ground floor"
    - "Downstairs"
```

### Remove an alias from a floor

Removes one or more aliases from a floor, and keeps the others.

The way back from [Add an alias to a floor](#add-an-alias-to-a-floor). 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 a floor**, and select **Home Assistant Core Integration: Remove an alias from a floor 👻**.
3. Pick the floor under **Floor 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](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_alias_from_floor) opens it in your Home Assistant, ready to run once.

![The Actions tool with Remove an alias from a floor 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-remove-alias-from-floor.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Remove an alias from a floor 👻 |
| Action name | `homeassistant.remove_alias_from_floor` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_alias_from_floor) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_alias_from_floor) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `floor_id` | string | Yes | `first_floor` |
| `alias` | string \| list of strings | Yes | `["Ground floor", "Downstairs"]` |

**Getting a floor ID from a floor name**

Not sure what the `floor_id` of a floor is? The `floor_id` field also accepts templates. You can use this template to use the floor's name instead:

```yaml
floor_id: "{{ floor_id('First floor') }}"
```

That template finds the floor ID of the floor with the name "First floor".

**Example actions in YAML**

Take two names away from the first floor:

```yaml
action: homeassistant.remove_alias_from_floor
data:
  floor_id: "first_floor"
  alias:
    - "Ground floor"
    - "Downstairs"
```

The same, using the floor's name instead of its ID:

```yaml
action: homeassistant.remove_alias_from_floor
data:
  floor_id: "{{ floor_id('First floor') }}"
  alias:
    - "Ground floor"
    - "Downstairs"
```

### Set aliases for a floor

Replaces all aliases of a floor with the ones you give.

Adding and removing one at a time works until you lose track of what is there. This sets the floor 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 a floor**, and select **Home Assistant Core Integration: Sets aliases for a floor 👻**.
3. Pick the floor under **Floor ID**.
4. Under **Aliases**, write every name the floor 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](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.set_floor_aliases) opens it in your Home Assistant, ready to run once.

![The Actions tool with Sets aliases for a floor 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-set-floor-aliases.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Sets aliases for a floor 👻 |
| Action name | `homeassistant.set_floor_aliases` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.set_floor_aliases) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.set_floor_aliases) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `floor_id` | string | Yes | `first_floor` |
| `aliases` | string \| list of strings | Yes | `["Ground floor", "Downstairs"]` |

**Getting a floor ID from a floor name**

Not sure what the `floor_id` of a floor is? The `floor_id` field also accepts templates. You can use this template to use the floor's name instead:

```yaml
floor_id: "{{ floor_id('First floor') }}"
```

That template finds the floor ID of the floor with the name "First floor".

**Example actions in YAML**

Give the first floor exactly these two other names:

```yaml
action: homeassistant.set_floor_aliases
data:
  floor_id: "first_floor"
  aliases:
    - "Ground floor"
    - "Downstairs"
```

The same, using the floor's name instead of its ID:

```yaml
action: homeassistant.set_floor_aliases
data:
  floor_id: "{{ floor_id('First floor') }}"
  aliases:
    - "Ground floor"
    - "Downstairs"
```

### Add an area to a floor

Puts one or more areas on a floor. The other areas on that floor stay where they are.

An area sits on one floor at most, so an area that was on another floor moves. Useful when a script builds your floor plan, or after a renovation moved a room upstairs.

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **add an area to a floor**, and select **Home Assistant Core Integration: Add an area to a floor 👻**.
3. Pick the floor under **Floor ID**.
4. Pick one or more areas under **Area ID**.
5. Select **Save**.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_area_to_floor) opens it in your Home Assistant, ready to run once.

![The Actions tool with Add an area to a floor 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-add-area-to-floor.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Add an area to a floor 👻 |
| Action name | `homeassistant.add_area_to_floor` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_area_to_floor) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_area_to_floor) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `floor_id` | string | Yes | `first_floor` |
| `area_id` | string \| list of strings | Yes | `living_room` |

**Getting a floor ID from a floor name**

Not sure what the `floor_id` of a floor is? The `floor_id` field also accepts templates. You can use this template to use the floor's name instead:

```yaml
floor_id: "{{ floor_id('First floor') }}"
```

That template finds the floor ID of the floor with the name "First floor".

**Getting an area ID from an area name**

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:

```yaml
area_id: "{{ area_id('Living room') }}"
```

That template finds the area ID of the area with the name "Living room".

**Example actions in YAML**

Put the living room on the first floor:

```yaml
action: homeassistant.add_area_to_floor
data:
  floor_id: "first_floor"
  area_id: "living_room"
```

The same, using the names of the floor and the area instead of their IDs:

```yaml
action: homeassistant.add_area_to_floor
data:
  floor_id: "{{ floor_id('First floor') }}"
  area_id: "{{ area_id('Living room') }}"
```

More than one area at once, as a list:

```yaml
action: homeassistant.add_area_to_floor
data:
  floor_id: "first_floor"
  area_id:
    - "living_room"
    - "kitchen"
```

### Remove an area from a floor

Takes one or more areas off the floor they are on. The other areas on that floor stay where they are.

The area itself stays, with everything in it. It just no longer sits on a floor. You don't say which floor: an area is on one floor 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 an area from a floor**, and select **Home Assistant Core Integration: Remove an area from a floor 👻**.
3. Pick one or more areas under **Area ID**.
4. Select **Save**.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_area_from_floor) opens it in your Home Assistant, ready to run once.

![The Actions tool with Remove an area from a floor 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-remove-area-from-floor.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Remove an area from a floor 👻 |
| Action name | `homeassistant.remove_area_from_floor` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_area_from_floor) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_area_from_floor) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `area_id` | string \| list of strings | Yes | `living_room` |

While this action is about floors, it does not need a floor ID. An area can only be on one floor at a time, so it is taken off the floor it is on.

**Getting an area ID from an area name**

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:

```yaml
area_id: "{{ area_id('Living room') }}"
```

That template finds the area ID of the area with the name "Living room".

**Example actions in YAML**

Take the living room off its floor:

```yaml
action: homeassistant.remove_area_from_floor
data:
  area_id: "living_room"
```

More than one area at once, as a list:

```yaml
action: homeassistant.remove_area_from_floor
data:
  area_id:
    - "living_room"
    - "kitchen"
```

## 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](https://github.com/frenck/spook/discussions).

## 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](https://github.com/frenck/spook/discussions).

Stuck, or found a bug? The [Support](https://spook.boo/support) page tells you where to go for help.


## Sitemap

See the full [sitemap](https://spook.boo/sitemap.md) for all pages.
