Category management
Categories in Home Assistant sort your automations, scripts, scenes, and helpers into groups on their own pages in the user interface. Each of those pages has its own set of categories, and something sits in one category per page.
Home Assistant lets you file things by hand, one at a time. Spook adds actions so your own automations and scripts can do it: file new automations away automatically, or tidy up a page full of them in one go.
Actions
Spook adds five actions for categories. You find them wherever you add an action, marked with a 👻. They all belong to the Home Assistant Core Integration, so that is the name in front of them in the list.
Run by hand, these actions need a user that is an administrator. Your automations and scripts can always run them.
Lighting. Uppercase or lowercase does not matter.Create a category
Adds a new category to one of the pages: automations, scripts, scenes, or helpers.
Useful in a setup script that prepares the categories your other automations file things into, so they exist before anything needs them.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for create a category, and select Home Assistant Core Integration: Create a category 👻.
- Under Scope, pick the page the category is for: Automations, Helpers, Scenes, or Scripts.
- Give it a Name, like
Lighting, and pick an Icon if you like. - Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Create a category 👻 |
| Action name | homeassistant.create_category |
| Action targets | No |
| Action response | Optional, the category_id of the new category |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
scope | string | Yes | automation |
name | string | Yes | Lighting |
icon | string | No | mdi:lightbulb |
The scope is one of automation, script, scene, or helpers. The action responds with the ID of the new category, in case you want to use it right away.
A Lighting category for automations, with the new ID kept in a variable:
action: homeassistant.create_category
data:
scope: automation
name: Lighting
icon: mdi:lightbulb
response_variable: category
- A name another category on the same page already has is refused. The same name on a different page is fine.
Update a category
Changes the name or icon of a category that already exists.
Deleting a category and creating it again would take it off everything that was in it. A lot to lose over an icon. This changes the category and leaves everything in it where it is. Anything you leave out keeps the value it already has.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for update a category, and select Home Assistant Core Integration: Update a category 👻.
- Under Scope, pick the page the category is on.
- Under Category, type the name of the category to change.
- Fill in only what should change: a new Name, a new Icon, or both.
- 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 a category 👻 |
| Action name | homeassistant.update_category |
| 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 |
scope | string | Yes | automation |
category_id | string | Yes | Lighting |
name | string | No | Lights |
icon | string or null | No | mdi:lightbulb-group |
Setting icon to null clears it.
Rename the Lighting category on the automations page to Lights:
action: homeassistant.update_category
data:
scope: automation
category_id: Lighting
name: Lights
- You need to give at least one thing to change. A call with only a
scopeandcategory_idis refused, so a misspelled field gives you an error. - Renaming a category to a name another category on the same page already has is refused too.
Delete a category
Removes a category from one of the pages.
For cleaning up the categories nobody uses anymore. Everything that was in it stays where it is, just without a category on that page.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for delete a category, and select Home Assistant Core Integration: Delete a category 👻.
- Under Scope, pick the page the category is on.
- Under Category, type the name of the category to delete.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Delete a category 👻 |
| Action name | homeassistant.delete_category |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
Delete the Lighting category from the automations page:
action: homeassistant.delete_category
data:
scope: automation
category_id: Lighting
- There is no undo. Creating the category again gives you the category back, not what was in it.
Add a category to an entity
Puts one or more automations, scripts, scenes, or helpers in a category.
The pages in Home Assistant let you file things by hand. This lets a script or automation do it. The script that sets up your alarm files its helpers under "Security" while it is at it.
There is no Scope to pick here: the page follows from what you file. An automation goes into an automation category, a script into a script category, a scene into a scene category, and anything else counts as a helper. Since something sits in one category per page, this replaces the category it was in before.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for add a category to an entity, and select Home Assistant Core Integration: Add a category to an entity 👻.
- Under Category, type the name of the category, like
Lighting. - Under Entity ID, pick the automations, scripts, scenes, or helpers to put in it.
- 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 a category to an entity 👻 |
| Action name | homeassistant.add_category_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 |
category_id | string | Yes | Lighting |
entity_id | string | list of strings | Yes | automation.porch_lights |
Every entity, and the category for each of them, is looked up before anything changes. If one of them does not exist, the action stops with an error that names it, and nothing is changed.
File two automations under Lighting:
action: homeassistant.add_category_to_entity
data:
category_id: Lighting
entity_id:
- automation.porch_lights
- automation.garden_lights
- The category has to exist on the page of every entity you pick. Filing an automation and a script under
Lightingin one go needs a Lighting category on the automations page and one on the scripts page.
Remove a category from an entity
Takes one or more automations, scripts, scenes, or helpers out of a category.
The other half of Add a category to an entity. Anything you pick that is in a different category is left alone, so you can safely aim it at a whole list.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for remove a category from an entity, and select Home Assistant Core Integration: Remove a category from an entity 👻.
- Under Category, type the name of the category, like
Lighting. - Under Entity ID, pick the automations, scripts, scenes, or helpers to take out of it.
- 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 a category from an entity 👻 |
| Action name | homeassistant.remove_category_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 |
category_id | string | Yes | Lighting |
entity_id | string | list of strings | Yes | automation.porch_lights |
Every entity, and the category for each of them, is looked up before anything changes. If one of them does not exist, the action stops with an error that names it, and nothing is changed.
Take an automation out of Lighting:
action: homeassistant.remove_category_from_entity
data:
category_id: Lighting
entity_id: automation.porch_lights
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.
Label management
Spook adds actions to Home Assistant to create, update and delete labels, and to put them on or take them off areas, devices and entities, all from your own automations and scripts.
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.





