
Last updated on February 3, 2026
Taking your Home Assistant automations to the next level means adding intelligence and context. You don’t want the hallway light blasting at 100% at 3 AM, and you definitely don’t want the robot vacuum starting its noisy routine when you have guests over. This is where conditional logic in Home Assistant comes in—a game-changing concept for creating a truly smart home that adapts to your life in 2026.
In this definitive guide, I’ll show you how to master conditional control in Home Assistant using “Toggle” Helpers (officially known as input_boolean). We’ll create different modes or states for your smart home, like “Vacation,” “Guest,” or “Do Not Disturb,” so your automations know exactly how and when they should run.
What Exactly is a Conditional Toggle (input_boolean)?
Technically, what we’re calling a conditional toggle is a Helper of the input_boolean type in Home Assistant. Think of it as a global, virtual switch. It doesn’t control any physical device directly; instead, it acts as a flag that your automations can check. Its state is binary: it’s either on (on) or off (off).
By creating several of these virtual switches, we can define the overall state of our house. Are we on vacation? We flip the input_boolean.vacation_mode toggle on. Have company? We enable input_boolean.guest_mode. These states allow us to build far more powerful and granular conditional control.
How to Create an input_boolean Toggle Helper in 2026 (The Easy Way)
Gone are the days of manually editing YAML files to create these helpers. For many versions now, the Home Assistant UI has made this incredibly simple. Just follow these steps:
- Navigate to Settings > Devices & Services.
- Select the Helpers tab at the top.
- Click the blue + Create Helper button in the bottom-right corner.
- From the list, choose Toggle. This is the user-friendly name for an
input_boolean. - A dialog box will pop up where you can configure your new helper:
- Name: A descriptive name, like “Vacation Mode”.
- Icon: Choose an icon to help you identify it at a glance (e.g., `mdi:beach`).
- Hit Create. That’s it! You’ve made your first conditional toggle, which will have an entity ID like
input_boolean.vacation_mode.
[Screenshot showing the creation of a ‘Toggle’ helper in the Home Assistant 2026 UI]
Practical Examples: Bringing Your Conditional Automations to Life
Now that we know how to create them, let’s explore some real-world examples of conditional automations in Home Assistant to understand their true power.
Vacation Mode: Smarter Security & Presence Simulation
This is the quintessential smart home mode. When input_boolean.vacation_mode is on, your home’s entire routine changes.
- Automations to disable: The one that starts the coffee maker in the morning, opens the blinds, or turns on welcome lights.
- Automations to enable: Randomly turning lights on and off at night to simulate presence, sending more aggressive security notifications if motion is detected.
An automation that turns off lights at sunrise could have this simple condition:
condition:
- condition: state
entity_id: 'input_boolean.vacation_mode'
state: 'off'This way, the automation only runs if you are NOT on vacation.
Guest Mode: Prioritizing Privacy and Comfort
When company’s over, the last thing you want is your smart home being… weird. Activating input_boolean.guest_mode can:
- Disable personal voice announcements on smart speakers.
- Lower the sensitivity of motion sensors to prevent lights from triggering unnecessarily.
- Enable an automation that turns on a courtesy light in the hallway all night at a very low brightness.
Do Not Disturb Mode: Automated for Peaceful Nights
This mode is perfect for preventing noisy notifications or bright lights from waking you up. Unlike the others, we can fully automate its activation and deactivation.
1. Create the Helpers:
- An
input_boolean.do_not_disturbtoggle. - Two Date and/or time helpers:
input_datetime.do_not_disturb_start_time(time only) andinput_datetime.do_not_disturb_end_time(time only).
2. Create the Automations:
Instead of wrestling with complex templates, the modern and most reliable way in Home Assistant 2026 is to use two simple automations:
- Automation to Turn On “Do Not Disturb”:
- Trigger: Time, linked to the
input_datetime.do_not_disturb_start_timeentity. - Action: Call the
input_boolean.turn_onservice, targetinginput_boolean.do_not_disturb.
- Trigger: Time, linked to the
- Automation to Turn Off “Do Not Disturb”:
- Trigger: Time, linked to the
input_datetime.do_not_disturb_end_timeentity. - Action: Call the
input_boolean.turn_offservice, targetinginput_boolean.do_not_disturb.
- Trigger: Time, linked to the
Then, in any automation that makes noise or turns on bright lights, you simply add a condition checking that input_boolean.do_not_disturb is off.
Why You Should Ditch the Old Template Method
In older versions of Home Assistant, you might have seen template triggers like this to activate the mode:
{{ states('sensor.time') == (state_attr('input_datetime.hora_inicio_no_molestar' , 'timestamp')|timestamp_custom('%H:%M', false)) }}While the dual-automation method is superior, it’s helpful to understand what this legacy code was doing:
states('sensor.time'): Got the current time as a string in “HH:MM” format.state_attr(...): Extracted the value from the time helper.|timestamp_custom('%H:%M', false): Converted that value into a comparable “HH:MM” text format.- The
==operator then checked if the current time matched the configured start time.
This approach is less efficient and prone to missing the trigger if Home Assistant happens to be restarting at that exact minute. The method using two separate Time triggers is bulletproof; stick with that.
Movie Mode: Combining Conditions for the Perfect Ambiance
This is where the real magic of conditional control in Home Assistant shines: combining our custom toggles with the state of other devices.
Imagine you enable input_boolean.movie_mode. You could have an automation that triggers when your TV starts playing content:
- Trigger: State of
media_player.living_room_tvchanges toplaying. - Condition: The state of
input_boolean.movie_modeison. - Actions:
- Turn off the main lights.
- Set an LED strip behind the TV to 10% brightness.
- Lower the blinds if it’s daytime.
This is the true power: your Home Assistant automations aren’t just reacting to an event, they’re reacting based on the specific context you’ve defined with your conditional toggles.
