Entity management
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 brings it back.
How to use it
- Open the automation or script that should disable the entity, and select Add action.
- Search for disable an entity, and select Home Assistant Core Integration: Disable an entity 👻.
- Pick one or more entities under Entity.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| 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 |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | "light.living_room" |
Disable one entity:
action: homeassistant.disable_entity
data:
entity_id: light.living_room
More than one entity at once, as a list:
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. Also useful for the entities an integration ships disabled, like extra diagnostic sensors, when an automation should switch them on.
How to use it
- Open the automation or script that should enable the entity, and select Add action.
- Search for enable an entity, and select Home Assistant Core Integration: Enable an entity 👻.
- Pick one or more entities under Entity.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| 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 |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | "light.living_room" |
Enable one entity:
action: homeassistant.enable_entity
data:
entity_id: light.living_room
More than one entity at once, as a list:
action: homeassistant.enable_entity
data:
entity_id:
- light.living_room
- light.kitchen_ceiling
- 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
- Open the automation or script that should hide the entity, and select Add action.
- Search for hide an entity, and select Home Assistant Core Integration: Hide an entity 👻.
- Pick one or more entities under Entity.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| 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 |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | "light.living_room" |
Hide one entity:
action: homeassistant.hide_entity
data:
entity_id: light.living_room
More than one entity at once, as a list:
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.
How to use it
- Open the automation or script that should unhide the entity, and select Add action.
- Search for unhide an entity, and select Home Assistant Core Integration: Unhide an entity 👻.
- Pick one or more entities under Entity.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| 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 |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | "light.living_room" |
Unhide one entity:
action: homeassistant.unhide_entity
data:
entity_id: light.living_room
More than one entity at once, as a list:
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
- Open the automation or script that should do this, and select Add action.
- Search for expose an entity, and select Home Assistant Core Integration: Expose an entity to assistants 👻.
- Pick one or more entities under Entity.
- Under Assistants, pick Alexa, Google Assistant, Assist, or any mix of them.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| 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 |
| 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.
Let Assist control the living room light:
action: homeassistant.expose_entity
data:
entity_id: light.living_room
assistants: conversation
Several entities to several assistants at once:
action: homeassistant.expose_entity
data:
entity_id:
- light.living_room
- light.kitchen_ceiling
assistants:
- cloud.alexa
- conversation
- 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. 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
- Open the automation or script that should do this, and select Add action.
- Search for stop exposing, and select Home Assistant Core Integration: Stop exposing an entity to assistants 👻.
- Pick one or more entities under Entity.
- Under Assistants, pick Alexa, Google Assistant, Assist, or any mix of them.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| 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 |
| 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.
Take the living room light away from Assist:
action: homeassistant.unexpose_entity
data:
entity_id: light.living_room
assistants: conversation
Several entities from several assistants at once:
action: homeassistant.unexpose_entity
data:
entity_id:
- light.living_room
- light.kitchen_ceiling
assistants:
- cloud.alexa
- conversation
- 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 for automations.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for update an entity's ID, and select Home Assistant Core Integration: Update an entity's ID 👻.
- Pick the entity under Entity.
- Fill in New Entity ID, like
light.dining_room. - Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| 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 |
The living room light is a dining room light now:
action: homeassistant.update_entity_id
data:
entity_id: light.living_room
new_entity_id: light.dining_room
- The new ID has to start with the same domain, so a
light.stays alight.. 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.
How to use it
- Make sure every integration you care about is up and running. Check Settings > Devices & services for any that failed to load.
- Open the script that should do the cleanup, and select Add action.
- Search for orphaned entities, and select Home Assistant Core Integration: Delete all orphaned entities 👻.
- There is nothing to fill in. 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 them for real.

| 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 |
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.
Delete them all:
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
- Open the script that should use the list, and select Add action.
- Search for orphaned database entities, and select Home Assistant Core Integration: List all orphaned database entities 👻.
- Under Response variable, give the list a name, like
orphaned. The steps after this one can use it. - Select Save.
Just want to see it work? Try this action opens it in your Home Assistant. Run it, and the response shows the list.

| 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 |
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.
Get the list:
action: homeassistant.list_orphaned_database_entities
A script that lists them, and purges their history from the database right after:
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
- Open the automation or script that should rename the entity, and select Add action.
- Search for rename an entity, and select Home Assistant Core Integration: Rename an entity 👻.
- Pick the entity under Entity.
- Fill in Name, like
Living room light. - Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| 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 |
Give the living room light a friendlier name:
action: homeassistant.rename_entity
data:
entity_id: light.living_room
name: "Living room light"
- 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
- Open the automation or script that should set the icon, and select Add action.
- Search for set the icon, and select Home Assistant Core Integration: Set the icon of an entity 👻.
- Pick one or more entities under Entity.
- Pick the icon under Icon, like
mdi:lamp. - 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 opens it in your Home Assistant, ready to run once.

| 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 |
| 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.
A lamp icon for the living room light:
action: homeassistant.set_entity_icon
data:
entity_id: light.living_room
icon: mdi:lamp
And back to the icon its integration gives it:
action: homeassistant.set_entity_icon
data:
entity_id: light.living_room
icon: null
- 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
- Open the automation or script that should add the alias, and select Add action.
- Search for add an alias to an entity, and select Home Assistant Core Integration: Add an alias to an entity 👻.
- Pick one or more entities under Entity.
- Under Alias, type the name to add. Add another field for each extra name.
- 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 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 |
| 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.
Two more names for the living room light:
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. A name that keeps triggering the wrong device goes, and the rest stay.
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 entity, and select Home Assistant Core Integration: Remove an alias from an entity 👻.
- Pick one or more entities under Entity.
- Under Alias, type the name to remove. Add another field for each extra name.
- 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 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 |
| 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.
Take "Big light" away from the living room light:
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
- Open the automation or script that should set the aliases, and select Add action.
- Search for aliases for an entity, and select Home Assistant Core Integration: Set aliases for an entity 👻.
- Pick one or more entities under Entity.
- Under Aliases, type every name the entity should have, one per field. Anything not in 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 | 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 |
| 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.
The living room light answers to exactly these two names:
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.
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.
Device management
Spook adds actions to disable, enable and update devices in Home Assistant from your automations and scripts.
Devices & entities
Spook adds a Home Assistant device with buttons to reload and restart, and sensors that count your entities, helpers, automations, devices, integrations and more.














