Automation

Home Assistant helpers – toggle several entities as a button

TL;DR: A Home Assistant toggle helper allows you to create a single switch in your UI that can trigger multiple actions or device states, simplifying complex automations.

Frequently Asked Questions

What is a Home Assistant toggle helper?

A Home Assistant toggle helper, often implemented as an input boolean, is a virtual switch you can create within Home Assistant. It acts as an entity that can be turned on or off, and crucially, can be used to trigger automations or control other devices.

AliExpress
How do I create a toggle helper in Home Assistant?

To create a toggle helper, navigate to Configuration > Helpers in your Home Assistant interface. Click ‘Add New’, select ‘Toggle’, give it a name and an optional icon, and then save it. You’ll get an entity ID like ‘input_boolean.your_toggle_name’.

What are some practical uses for a toggle helper?

Toggle helpers are incredibly versatile. You can use them for ‘movie mode’ to dim lights and turn on LEDs, ‘bedtime mode’ to turn off lights and adjust AC, or ‘leaving home’ to switch off all devices. Essentially, any scenario requiring multiple device states to be changed at once.

How do I make a toggle helper control other devices?

Once your toggle helper is created, you need to set up automations. Create one automation to toggle the helper itself (e.g., triggered by a button press). Then, create two more automations: one triggered when the helper turns ON (to activate devices) and another when it turns OFF (to deactivate devices).

You can create a button to toggle several entities in Home Assistant. A toggle helper is really useful as it is an entity that can be toggled from automations and UI.

Example usages:
– Movie mode – Turn off living room lights and turn LEDs behind the tv.
– Bedtime mode – turn off all the lights and turn on the AC
– Leaving home – turn off all the lights
– Entering home – turn on several lights
Just anything you can think of actually, those was just a few ideas.

The way to make a Toggle helper is really simple.
You need to go to Configuration -> Helpers, then add new – and select a toggle.

Name your new toggle (you can give it an icon too.)
It will be available on the helpers list once created – remember the Entity Id which in this case is input_boolean.bedtime

Now, we need to create a new automation for toggling that entity.
We do that by going to Configuration -> Automations -> Add new.
Create your triggers – it can be a click on a wireless button for example.
Then, in the Actions section – make the action type – call service – input_boolean.toggle. Targets will be the entity that we’ve created.

Save the automation.
We now have an automation that just toggles this toggle entity.
We need to create two more automations – one for when the toggle is on, and one for off – which will have the actual toggling of the automations.

Create a new automation, and create a state trigger. Select our newly created entity.
This automation will now be triggered based on this input boolean state.

Now you can add your lights in the actions section.
After that – save this automation and create one more with the same settings – but this time that turns off the lights or does other stuff.

Have fun!

One response to “Home Assistant helpers – toggle several entities as a button”

  1. There should only be a single action automation, triggered on state. So this automation will trigger when the state changes, whether it be ON or OFF.

    Then in the action section of the automation you select CHOOSE, and specify the condition as the toggle’s ON or OFF state and associated actions, with the other state’s actions included as “default”. Or I suppose you could even set two CONDITION actions, specifying each of the toggle states.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.