Integrations

Counter

Spook adds actions to create and delete counter helpers in Home Assistant from your automations and scripts, without a trip to the helper settings.

The counter helper in Home Assistant keeps count: it goes up or down by a step, can be reset, and can be kept between a minimum and a maximum. Handy for counting how often something happened.

Spook adds actions to create and delete these helpers from your automations and scripts.

Actions

Spook adds two actions for counters. You find them wherever you add an action, marked with a 👻.

Create a counter

Creates a new counter helper, the same as adding one on the helpers page.

Great for a script that needs to count something only for itself: it makes a counter, counts, and deletes it again when it is done. Or for setting up a new installation with the counters you always want, in one go.

How to use it

  1. Open the automation or script that should create the counter, and select Add action.
  2. Search for create a counter, and select Counter: Create a counter 👻.
  3. Fill in Name, like Coffee cups.
  4. Fill in whatever else you want to set: Initial value, Minimum, Maximum, Step, Restore or Icon. To pick the entity ID yourself, fill in Counter entity ID.
  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 counter 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

Delete a counter

Deletes one or more counter helpers, disabled ones included.

The other half of Create a counter: a script cleaning up the counter it made, or you clearing out the counters that piled up over the years. Everything in the list is checked first: if one of them cannot be deleted, none of them are.

How to use it

  1. Open the automation or script that should delete the counter, and select Add action.
  2. Search for delete a counter, and select Counter: Delete a counter 👻.
  3. Under Entity ID, choose the counters to delete.
  4. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it deletes the counter for real.

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

Use cases

What people use this for:

  • Let a script make the counter it needs, and clean it up again afterwards, so the helpers page only has counters you actually use.

Missing something here?

An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.