Entities in Home Assistant are the building blocks of your home automation. Spook enhances the core of Home Assistant by adding actions to control those entities programmatically.
Actions¶
The following entity management actions are added to your Home Assistant instance:
Disable an entity¶
This action allows you to disable an entity on the fly.
Action properties | |
---|---|
Action | Disable an entity 👻 |
Action name | homeassistant.disable_entity |
Action targets | No |
Action response | No response |
Spook's influence | Newly added action. |
Developer tools | Try this action |
Action data parameters | |||
---|---|---|---|
Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | "light.living_room" |
1 2 3
action: homeassistant.disable_entity data: entity_id: light.living_room
Or multiple entities at once:
1 2 3 4 5
action: homeassistant.disable_entity data: entity_id: - light.living_room - light.kitchen_ceiling
Enable an entity¶
This action allows you to enable an entity on the fly.
Action properties | |
---|---|
Action | Enable an entity 👻 |
Action name | homeassistant.enable_entity |
Action targets | No |
Action response | No response |
Spook's influence | Newly added action. |
Developer tools | Try this action |
Action data parameters | |||
---|---|---|---|
Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | "light.living_room" |
1 2 3
action: homeassistant.enable_entity data: entity_id: light.living_room
Or multiple entities at once:
1 2 3 4 5
action: homeassistant.enable_entity data: entity_id: - light.living_room - light.kitchen_ceiling
Hide an entity¶
This action allows you to hide an entity on the fly.
It can be particularly useful when you have a lot of entities, and you want to hide some of them from the generated UI based programmatically. Hidden entities are also not exposed to external voice assistants, like Google Assistant or Alexa.
Action properties | |
---|---|
Action | Hide an entity 👻 |
Action name | homeassistant.hide_entity |
Action targets | No |
Action response | No response |
Spook's influence | Newly added action. |
Developer tools | Try this action |
Action data parameters | |||
---|---|---|---|
Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | "light.living_room" |
1 2 3
action: homeassistant.hide_entity data: entity_id: light.living_room
Or multiple entities at once:
1 2 3 4 5
action: homeassistant.hide_entity data: entity_id: - light.living_room - light.kitchen_ceiling
Unhide an entity¶
This action allows you to unhide an entity on the fly.
Action properties | |
---|---|
Action | Unide an entity 👻 |
Action name | homeassistant.unhide_entity |
Action targets | No |
Action response | No response |
Spook's influence | Newly added action. |
Developer tools | Try this action |
Action data parameters | |||
---|---|---|---|
Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | "light.living_room" |
1 2 3
action: homeassistant.unhide_entity data: entity_id: light.living_room
Or multiple entities at once:
1 2 3 4 5
action: homeassistant.unhide_entity data: entity_id: - light.living_room - light.kitchen_ceiling
Update an entity’s ID¶
This action allows you to update an entity’s ID on the fly.
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. |
Developer tools | Try this action |
Action data parameters | |||
---|---|---|---|
Attribute | Type | Required | Default / Example |
entity_id | string | Yes | "light.living_room" |
new_entity_id | string | Yes | "light.dining_room" |
1 2 3 4
action: homeassistant.update_entity_id data: entity_id: light.living_room new_entity_id: light.dining_room
Delete all orphaned entities¶
Mass clean up your Home Assistant by deleting all orphaned entities in one go.
Orphaned entities are entities that are no longer claimed by an integration. This can happen when an integration is removed or when an integration is no longer working. Home Assistant considers an entity only orphaned if it has been unclaimed since the last restart of Home Assistant.
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. |
Developer tools | Try this action |
List all orphaned database entities¶
Mass clean up your database with the help of Spook by listing all orphaned database entities in one action.
Orphaned database entities are entities that are no longer claimed by integration but still exist in the database. This can happen when an integration is removed or when an entity is disabled.
Action properties | |
---|---|
Action | List orphaned database entities 👻 |
Action name | homeassistant.list_orphaned_database_entities |
Action targets | No |
Action response | Action response |
Spook's influence | Newly added action. |
Developer tools | Try this action |
Script to remove entities from database
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
That template will find the area ID of the area with the name “Living room”.
Blueprints & tutorials¶
There are currently no known blueprints or tutorials for the enhancements Spook provides for these features. If you created one or stumbled upon one, please let us know in our discussion forums.
Features requests, ideas, and support¶
If you have an idea on how to further enhance this, for example, by adding a new action, entity, or repairs detection; feel free to let us know in our discussion forums.
Are you stuck using these new features? Or maybe you’ve run into a bug? Please check the page on where to go for help.