Core extensions

Category management

Spook adds actions to Home Assistant to create, update and delete categories, and to file automations, scripts, scenes and helpers into them, all from your own automations and scripts.

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.

Categories by nameHome Assistant never shows you the ID of a category, and it is a random one. So wherever an action below asks for a category, you type its name, like 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

  1. Open the automation or script that should do this, and select Add action.
  2. Search for create a category, and select Home Assistant Core Integration: Create a category 👻.
  3. Under Scope, pick the page the category is for: Automations, Helpers, Scenes, or Scripts.
  4. Give it a Name, like Lighting, and pick an Icon if you like.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Create a category 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should do this, and select Add action.
  2. Search for update a category, and select Home Assistant Core Integration: Update a category 👻.
  3. Under Scope, pick the page the category is on.
  4. Under Category, type the name of the category to change.
  5. Fill in only what should change: a new Name, a new Icon, or both.
  6. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Update a category 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should do this, and select Add action.
  2. Search for delete a category, and select Home Assistant Core Integration: Delete a category 👻.
  3. Under Scope, pick the page the category is on.
  4. Under Category, type the name of the category to delete.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Delete a category 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should do this, and select Add action.
  2. Search for add a category to an entity, and select Home Assistant Core Integration: Add a category to an entity 👻.
  3. Under Category, type the name of the category, like Lighting.
  4. Under Entity ID, pick the automations, scripts, scenes, or helpers to put in it.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Add a category to an entity 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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

  1. Open the automation or script that should do this, and select Add action.
  2. Search for remove a category from an entity, and select Home Assistant Core Integration: Remove a category from an entity 👻.
  3. Under Category, type the name of the category, like Lighting.
  4. Under Entity ID, pick the automations, scripts, scenes, or helpers to take out of it.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Remove a category from an entity 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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.