Integrations

Input boolean

Spook adds actions to create and delete input boolean (toggle) helpers in Home Assistant from your automations and scripts, and to turn them on or off for a while.

The input boolean helper in Home Assistant is a toggle: on or off, controlled from a dashboard or from automations, and usable as a trigger or condition.

Spook adds actions to the input boolean integration to create and delete these helpers from automations and scripts, and to turn them on or off for a while.

Actions

Spook adds four actions for input booleans. You find them wherever you add an action, marked with a 👻.

Create an input boolean

Creates a new input boolean (toggle) helper, the same as adding one on the helpers page.

Some flags are only needed for a while. A script that runs a party mode, a move, a holiday: it needs a toggle to remember "this is going on", and nothing else ever looks at it. Made by hand, that toggle stays on the helpers page forever. Made with this action, the script makes it when it starts, and deletes it when it is done.

How to use it

  1. Open the automation or script that should make the toggle, and select Add action.
  2. Search for create an input boolean, and select Input boolean: Create an input boolean 👻.
  3. Fill in Name, like Guest mode.
  4. Optionally, set Input boolean entity ID to pick the entity ID yourself, Initial value, and Icon.
  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 an input boolean 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

Delete an input boolean

Deletes one or more input boolean helpers.

The other half of Create an input boolean: the script that made a toggle cleans it up again. It works on any input boolean made in the UI as well, disabled ones included.

How to use it

  1. Open the automation or script that should do the cleaning up, and select Add action.
  2. Search for delete an input boolean, and select Input boolean: Delete an input boolean 👻.
  3. Under Entity ID, choose the input booleans 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 that it really deletes.

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

Turn on for

Turns input booleans on for a while, and turns them back off when the time is up. Spook stores when each one is due back, so a restart of Home Assistant in between does not stop that.

It is Turn on for, with the same rules, for input booleans only. Named outright, anything that is not a input boolean is refused with an error. Picked up through an area, a device, a floor, a label or a group, it is passed over.

How to use it

  1. Open the automation or script that should do this, and select Add action.
  2. Search for turn on for, and select Input boolean: Turn on for 👻.
  3. Under Targets, choose the input booleans.
  4. Set Duration to how long they should stay on, like 00:15:00 for fifteen minutes.
  5. Select Save.

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

Turn off for

Turns input booleans off for a while, and turns them back on when the time is up. Spook stores when each one is due back, so a restart of Home Assistant in between does not stop that.

It is Turn off for, with the same rules, for input booleans only. Named outright, anything that is not a input boolean is refused with an error. Picked up through an area, a device, a floor, a label or a group, it is passed over.

How to use it

  1. Open the automation or script that should do this, and select Add action.
  2. Search for turn off for, and select Input boolean: Turn off for 👻.
  3. Under Targets, choose the input booleans.
  4. Set Duration to how long they should stay off, like 00:30:00 for half an hour.
  5. Select Save.

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

Use cases

What people use this for:

  • Let a script make the flag it needs, and clean it up again afterwards, so the helpers page only has toggles 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.