---
title: "Entity management"
description: "Spook adds actions to manage entities in Home Assistant from automations and scripts. Disable, hide, rename, expose, set icons and aliases, and clean up orphans."
canonical_url: "https://spook.boo/entities"
---
# Entity management

> Spook adds actions to manage entities in Home Assistant from automations and scripts. Disable, hide, rename, expose, set icons and aliases, and clean up orphans.

Entities are the building blocks of Home Assistant: every light, sensor, switch and button you see is one. You change their settings in the UI, in the settings dialog of each entity.

Spook adds actions that change those same settings from an automation or script: disable or hide an entity, give it a new name, icon or aliases, decide which voice assistants may see it, and clean up the entities nothing claims anymore.

## Actions

Spook adds fourteen actions for entities. You find them wherever you add an action, marked with a 👻. Most of them change your setup: calling one of those by hand takes an administrator, while automations and scripts run them as usual.

### Disable an entity

Disables one or more entities, the same as turning off **Enabled** in the entity's settings.

A disabled entity is gone from Home Assistant until you enable it again: no state, no new history, nothing in your dashboards. Handy for the sensors of a device that is packed away for the season, or a noisy entity you only need once in a while. [Enable an entity](#enable-an-entity) brings it back.

**How to use it**

1. Open the automation or script that should disable the entity, and select **Add action**.
2. Search for **disable an entity**, and select **Home Assistant Core Integration: Disable an entity 👻**.
3. Pick one or more entities under **Entity**.
4. Select **Save**.

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

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

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

**Technical details**

| Action properties |
| --- |
| Action | Disable an entity 👻 |
| Action name | `homeassistant.disable_entity` |
| 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.disable_entity) [![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.disable_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |

**Example actions in YAML**

Disable one entity:

```yaml
action: homeassistant.disable_entity
data:
  entity_id: light.living_room
```

More than one entity at once, as a list:

```yaml
action: homeassistant.disable_entity
data:
  entity_id:
    - light.living_room
    - light.kitchen_ceiling
```

### Enable an entity

Enables one or more disabled entities again.

The way back from [Disable an entity](#disable-an-entity). Also useful for the entities an integration ships disabled, like extra diagnostic sensors, when an automation should switch them on.

**How to use it**

1. Open the automation or script that should enable the entity, and select **Add action**.
2. Search for **enable an entity**, and select **Home Assistant Core Integration: Enable an entity 👻**.
3. Pick one or more entities under **Entity**.
4. Select **Save**.

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

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

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

**Technical details**

| Action properties |
| --- |
| Action | Enable an entity 👻 |
| Action name | `homeassistant.enable_entity` |
| 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.enable_entity) [![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.enable_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |

**Example actions in YAML**

Enable one entity:

```yaml
action: homeassistant.enable_entity
data:
  entity_id: light.living_room
```

More than one entity at once, as a list:

```yaml
action: homeassistant.enable_entity
data:
  entity_id:
    - light.living_room
    - light.kitchen_ceiling
```

**Known limitations**

- An enabled entity does not come back the moment the action runs. Home Assistant reloads the integration it belongs to for that, about 30 seconds later, the same as when you enable it in the UI.

### Hide an entity

Hides one or more entities, the same as turning off **Visible** in the entity's settings.

A hidden entity keeps working. It just stays out of sight. It does not show up on dashboards that Home Assistant builds for you, and voice assistants like Google Assistant or Alexa don't see it by default. You can still expose it to them on purpose, in the voice assistant settings. Useful for the helper entities and technical sensors you need, but never want to look at.

**How to use it**

1. Open the automation or script that should hide the entity, and select **Add action**.
2. Search for **hide an entity**, and select **Home Assistant Core Integration: Hide an entity 👻**.
3. Pick one or more entities under **Entity**.
4. Select **Save**.

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

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

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

**Technical details**

| Action properties |
| --- |
| Action | Hide an entity 👻 |
| Action name | `homeassistant.hide_entity` |
| 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.hide_entity) [![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.hide_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |

**Example actions in YAML**

Hide one entity:

```yaml
action: homeassistant.hide_entity
data:
  entity_id: light.living_room
```

More than one entity at once, as a list:

```yaml
action: homeassistant.hide_entity
data:
  entity_id:
    - light.living_room
    - light.kitchen_ceiling
```

### Unhide an entity

Makes one or more hidden entities visible again.

The way back from [Hide an entity](#hide-an-entity).

**How to use it**

1. Open the automation or script that should unhide the entity, and select **Add action**.
2. Search for **unhide an entity**, and select **Home Assistant Core Integration: Unhide an entity 👻**.
3. Pick one or more entities under **Entity**.
4. Select **Save**.

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

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

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

**Technical details**

| Action properties |
| --- |
| Action | Unhide an entity 👻 |
| Action name | `homeassistant.unhide_entity` |
| 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.unhide_entity) [![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.unhide_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |

**Example actions in YAML**

Unhide one entity:

```yaml
action: homeassistant.unhide_entity
data:
  entity_id: light.living_room
```

More than one entity at once, as a list:

```yaml
action: homeassistant.unhide_entity
data:
  entity_id:
    - light.living_room
    - light.kitchen_ceiling
```

### Expose an entity to assistants

Lets one or more voice assistants see and control one or more entities.

Home Assistant keeps a separate list per assistant of what it may see. This is the same setting you find under **Settings** > **Voice assistants** > **Expose**, applied to as many entities as you like at once. Expose the guest room lights to Assist when guests arrive, or a whole batch of new entities to Alexa without ticking them one by one.

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **expose an entity**, and select **Home Assistant Core Integration: Expose an entity to assistants 👻**.
3. Pick one or more entities under **Entity**.
4. Under **Assistants**, pick **Alexa**, **Google Assistant**, **Assist**, or any mix of them.
5. Select **Save**.

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

![The Actions tool with Expose an entity to assistants 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-expose-entity.webp)

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

**Technical details**

| Action properties |
| --- |
| Action | Expose an entity to assistants 👻 |
| Action name | `homeassistant.expose_entity` |
| 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.expose_entity) [![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.expose_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |
| `assistants` | string \| list of strings | Yes | `cloud.alexa`, `cloud.google_assistant`, `conversation` |

The assistants are named the way Home Assistant names them internally: `cloud.alexa` for Alexa, `cloud.google_assistant` for Google Assistant, and `conversation` for Assist. Anything else is refused.

**Example actions in YAML**

Let Assist control the living room light:

```yaml
action: homeassistant.expose_entity
data:
  entity_id: light.living_room
  assistants: conversation
```

Several entities to several assistants at once:

```yaml
action: homeassistant.expose_entity
data:
  entity_id:
    - light.living_room
    - light.kitchen_ceiling
  assistants:
    - cloud.alexa
    - conversation
```

**Known limitations**

- Every entity is checked before any of them change, so naming one that does not exist fails the whole call instead of leaving the ones before it done.

### Stop exposing an entity to assistants

Takes one or more entities out of reach of one or more voice assistants.

The reverse of [Expose an entity to assistants](#expose-an-entity-to-assistants). The guests have left, so Assist no longer needs to control the guest room. Or the front door lock should never be something Alexa can open, whatever got exposed along the way.

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **stop exposing**, and select **Home Assistant Core Integration: Stop exposing an entity to assistants 👻**.
3. Pick one or more entities under **Entity**.
4. Under **Assistants**, pick **Alexa**, **Google Assistant**, **Assist**, or any mix of them.
5. Select **Save**.

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

![The Actions tool with Stop exposing an entity to assistants 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-unexpose-entity.webp)

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

**Technical details**

| Action properties |
| --- |
| Action | Stop exposing an entity to assistants 👻 |
| Action name | `homeassistant.unexpose_entity` |
| 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.unexpose_entity) [![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.unexpose_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |
| `assistants` | string \| list of strings | Yes | `cloud.alexa`, `cloud.google_assistant`, `conversation` |

The assistants are named the way Home Assistant names them internally: `cloud.alexa` for Alexa, `cloud.google_assistant` for Google Assistant, and `conversation` for Assist. Anything else is refused.

**Example actions in YAML**

Take the living room light away from Assist:

```yaml
action: homeassistant.unexpose_entity
data:
  entity_id: light.living_room
  assistants: conversation
```

Several entities from several assistants at once:

```yaml
action: homeassistant.unexpose_entity
data:
  entity_id:
    - light.living_room
    - light.kitchen_ceiling
  assistants:
    - cloud.alexa
    - conversation
```

**Known limitations**

- Every entity is checked before any of them change, so naming one that does not exist fails the whole call instead of leaving the ones before it done.

### Update an entity's ID

Gives an entity a new entity ID.

The same as changing **Entity ID** in the entity's settings. Useful when a script sets up a fresh installation, or when you clean up a batch of IDs that came out of an integration in a way you don't like.

Your automations, scripts and dashboards are not changed along with it. Anything that uses the old ID stops finding the entity. Spook points those out as repairs, like [Unknown referenced entities](https://spook.boo/automation#unknown-referenced-entities) for automations.

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **update an entity's ID**, and select **Home Assistant Core Integration: Update an entity's ID 👻**.
3. Pick the entity under **Entity**.
4. Fill in **New Entity ID**, like `light.dining_room`.
5. Select **Save**.

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

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

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

**Technical details**

| Action properties |
| --- |
| Action | Update an entity's ID 👻 |
| Action name | `homeassistant.update_entity_id` |
| 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_entity_id) [![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_entity_id) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string | Yes | `"light.living_room"` |
| `new_entity_id` | string | Yes | `"light.dining_room"` |

**Example actions in YAML**

The living room light is a dining room light now:

```yaml
action: homeassistant.update_entity_id
data:
  entity_id: light.living_room
  new_entity_id: light.dining_room
```

**Known limitations**

- The new ID has to start with the same domain, so a `light.` stays a `light.`. An ID another entity already has is refused.
- Only entities Home Assistant can manage from the UI, the ones with a unique ID, can get a new ID this way.

### Delete all orphaned entities

Deletes every orphaned entity in one go.

An orphaned entity is one no integration claims anymore. Remove an integration, or replace a device, and its entities can stay behind in the entity list, marked as no longer provided. Deleting them one by one gets old fast. This deletes all of them at once.

> **Warning:** Home Assistant marks an entity orphaned when its integration has not set it up since the last start. An integration that is offline, or failed to start, leaves its entities looking orphaned too. Running this action deletes those entities as well.

**How to use it**

1. Make sure every integration you care about is up and running. Check **Settings** > **Devices & services** for any that failed to load.
2. Open the script that should do the cleanup, and select **Add action**.
3. Search for **orphaned entities**, and select **Home Assistant Core Integration: Delete all orphaned entities 👻**.
4. There is nothing to fill in. Select **Save**.

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

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

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

**Technical details**

| Action properties |
| --- |
| Action | Delete all orphaned entities 👻 |
| Action name | `homeassistant.delete_all_orphaned_entities` |
| 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_all_orphaned_entities) [![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_all_orphaned_entities) |

Orphaned entities are entities no integration claims anymore. This happens when an integration is removed, or no longer works. Home Assistant only considers an entity orphaned when it has been unclaimed since the last restart of Home Assistant. An integration you just removed can need a restart before its entities count as orphaned.

**Example actions in YAML**

Delete them all:

```yaml
action: homeassistant.delete_all_orphaned_entities
```

### List all orphaned database entities

Lists the entities your database still holds history for, but that no longer exist in Home Assistant.

Remove an integration, or disable an entity, and its history stays in the database. That history takes up space and does nothing for you. This finds those entities, so you can decide what to purge. It only lists, it deletes nothing.

**How to use it**

1. Open the script that should use the list, and select **Add action**.
2. Search for **orphaned database entities**, and select **Home Assistant Core Integration: List all orphaned database entities 👻**.
3. Under **Response variable**, give the list a name, like `orphaned`. The steps after this one can use it.
4. Select **Save**.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.list_orphaned_database_entities) opens it in your Home Assistant. Run it, and the response shows the list.

![The Actions tool with List all orphaned database entities 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-list-orphaned-database-entities.webp)

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

**Technical details**

| Action properties |
| --- |
| Action | List all orphaned database entities 👻 |
| Action name | `homeassistant.list_orphaned_database_entities` |
| Action targets | No |
| Action response | Action response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.list_orphaned_database_entities) [![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.list_orphaned_database_entities) |

| Action response data |
| --- |
| Attribute | Type |
| `count` | integer |
| `entities` | list |

Orphaned database entities are entities no integration claims anymore, but that still exist in the database. This happens when an integration is removed, or an entity is disabled. Spook compares every entity ID the recorder ever wrote down with the entities Home Assistant has right now.

**Example actions in YAML**

Get the list:

```yaml
action: homeassistant.list_orphaned_database_entities
```

**Script to remove entities from database**

A script that lists them, and purges their history from the database right after:

```yaml
alias: Delete orphaned database entities
sequence:
  - action: homeassistant.list_orphaned_database_entities
    response_variable: orphaned
  - action: recorder.purge_entities
    target:
      entity_id: |
        {{ orphaned.entities }}
    data:
      keep_days: 0
mode: single
```

### Rename an entity

Gives one or more entities a new name, the one you see in the UI.

The same as changing **Name** in the entity's settings. Its entity ID stays as it is, so nothing that uses the entity breaks.

**How to use it**

1. Open the automation or script that should rename the entity, and select **Add action**.
2. Search for **rename an entity**, and select **Home Assistant Core Integration: Rename an entity 👻**.
3. Pick the entity under **Entity**.
4. Fill in **Name**, like `Living room light`.
5. Select **Save**.

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

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

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

**Technical details**

| Action properties |
| --- |
| Action | Rename an entity 👻 |
| Action name | `homeassistant.rename_entity` |
| 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.rename_entity) [![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.rename_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string | Yes | `"light.living_room"` |
| `name` | string | Yes | `"Living room light"` |

**Example actions in YAML**

Give the living room light a friendlier name:

```yaml
action: homeassistant.rename_entity
data:
  entity_id: light.living_room
  name: "Living room light"
```

**Known limitations**

- Pick more than one entity, and they all get the same name.

### Set the icon of an entity

Sets the icon of one or more entities.

The same setting as **Icon** in the entity's settings. An icon that shows what is going on reads faster than text: a garbage can that changes for the week it goes out, or a fan icon for the plug that powers the fan.

**How to use it**

1. Open the automation or script that should set the icon, and select **Add action**.
2. Search for **set the icon**, and select **Home Assistant Core Integration: Set the icon of an entity 👻**.
3. Pick one or more entities under **Entity**.
4. Pick the icon under **Icon**, like `mdi:lamp`.
5. Select **Save**.

To go back to the icon the integration gives the entity, set the icon to `null` in YAML mode.

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

![The Actions tool with Set the icon of an entity 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-set-entity-icon.webp)

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

**Technical details**

| Action properties |
| --- |
| Action | Set the icon of an entity 👻 |
| Action name | `homeassistant.set_entity_icon` |
| 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_entity_icon) [![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_entity_icon) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |
| `icon` | string or `null` | Yes | `"mdi:lamp"` |

Set `icon` to `null` to take it away again, and the entity goes back to the icon its integration gives it.

**Example actions in YAML**

A lamp icon for the living room light:

```yaml
action: homeassistant.set_entity_icon
data:
  entity_id: light.living_room
  icon: mdi:lamp
```

And back to the icon its integration gives it:

```yaml
action: homeassistant.set_entity_icon
data:
  entity_id: light.living_room
  icon: null
```

**Known limitations**

- Only entities with a unique ID have settings to keep an icon in. An entity without one is refused, with a message that says so.

### Add an alias to an entity

Adds one or more aliases to one or more entities, and keeps the ones they already have.

Aliases are the other names a voice assistant knows an entity by. Your partner calls it "the big light", the kids call it "the ceiling": add both, and Assist understands everyone.

**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 entity**, and select **Home Assistant Core Integration: Add an alias to an entity 👻**.
3. Pick one or more entities under **Entity**.
4. Under **Alias**, type the name to add. Add another field for each extra name.
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_entity) opens it in your Home Assistant, ready to run once.

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

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

**Technical details**

| Action properties |
| --- |
| Action | Add an alias to an entity 👻 |
| Action name | `homeassistant.add_alias_to_entity` |
| 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_entity) [![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_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |
| `alias` | string \| list of strings | Yes | `"Reading lamp"` |

New aliases go at the end, and one the entity already has is not added twice.

New entities have their own name as an alias. That is how a voice assistant knows what to call them without any alias added. These actions do not touch that one. Turning it off is up to you in the entity's voice settings.

**Example actions in YAML**

Two more names for the living room light:

```yaml
action: homeassistant.add_alias_to_entity
data:
  entity_id: light.living_room
  alias:
    - Reading lamp
    - Big light
```

### Remove an alias from an entity

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

The way back from [Add an alias to an entity](#add-an-alias-to-an-entity). A name that keeps triggering the wrong device goes, and the rest stay.

**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 entity**, and select **Home Assistant Core Integration: Remove an alias from an entity 👻**.
3. Pick one or more entities under **Entity**.
4. Under **Alias**, type the name to remove. Add another field for each extra name.
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_entity) opens it in your Home Assistant, ready to run once.

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

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

**Technical details**

| Action properties |
| --- |
| Action | Remove an alias from an entity 👻 |
| Action name | `homeassistant.remove_alias_from_entity` |
| 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_entity) [![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_entity) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |
| `alias` | string \| list of strings | Yes | `"Big light"` |

New entities have their own name as an alias. That is how a voice assistant knows what to call them without any alias added. These actions do not touch that one. Turning it off is up to you in the entity's voice settings.

**Example actions in YAML**

Take "Big light" away from the living room light:

```yaml
action: homeassistant.remove_alias_from_entity
data:
  entity_id: light.living_room
  alias: Big light
```

### Set aliases for an entity

Replaces the aliases of one or more entities with the ones you give.

Adding and removing one at a time works until you lose track of what is there. This sets the entity 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 entity**, and select **Home Assistant Core Integration: Set aliases for an entity 👻**.
3. Pick one or more entities under **Entity**.
4. Under **Aliases**, type every name the entity should have, one per field. Anything not in 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_entity_aliases) opens it in your Home Assistant, ready to run once.

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

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

**Technical details**

| Action properties |
| --- |
| Action | Set aliases for an entity 👻 |
| Action name | `homeassistant.set_entity_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_entity_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_entity_aliases) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `entity_id` | string \| list of strings | Yes | `"light.living_room"` |
| `aliases` | string \| list of strings | Yes | `["Reading lamp", "Big light"]` |

New entities have their own name as an alias. That is how a voice assistant knows what to call them without any alias added. These actions do not touch that one. Turning it off is up to you in the entity's voice settings.

**Example actions in YAML**

The living room light answers to exactly these two names:

```yaml
action: homeassistant.set_entity_aliases
data:
  entity_id: light.living_room
  aliases:
    - Reading lamp
    - Big light
```

## 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.
