Mastering Input Helpers: Dynamic Control and User Interaction in Home Assistant Automations
- #Home_Assistant
- #Automation
- #Input_Helpers
- #Smart_Home
- #Configuration

Mastering Input Helpers: Dynamic Control and User Interaction in Home Assistant Automations
Home Assistant excels at automation, but what if you need to dynamically influence those automations without editing configuration files every time? This is where Input Helpers shine. These powerful entities act as virtual switches, sliders, text fields, date/time pickers, and dropdowns, allowing you to create a dynamic interface for your smart home logic directly within your Lovelace dashboard.
Instead of hardcoding values or relying solely on device states, Input Helpers enable user-driven adjustments, conditional automations, and more sophisticated control over your environment. Let's dive into mastering these versatile components.
What Are Input Helpers?
Input Helpers are a set of built-in Home Assistant integrations designed to store and manage user-defined states. They persist across Home Assistant restarts, making them ideal for settings, modes, or temporary overrides that you want to control interactively.
There are several types of Input Helpers, each serving a unique purpose:
input_boolean
: A simple on/off toggle. Perfect for enabling/disabling modes (e.g., 'Vacation Mode'), overrides (e.g., 'Guest Lights On'), or general boolean logic.input_number
: Stores a numerical value within a specified range. Ideal for setting temperatures, dimming levels, automation delays, or sensor thresholds.input_text
: Stores a string of text. Useful for dynamic notification content, custom messages, or even temporary notes.input_datetime
: Stores a date and/or time. Great for scheduling one-off events, setting specific alarm times, or defining time-based conditions.input_select
: Provides a dropdown list of predefined options. Excellent for selecting operating modes (e.g., 'Day', 'Night', 'Away'), profiles, or choosing a specific action from a list.
Setting Up Your Input Helpers
Input Helpers can be configured via the Home Assistant UI or directly in your configuration.yaml
file.
Via Home Assistant UI (Recommended for ease of use)
- Go to Settings > Devices & Services.
- Click on the Helpers tab.
- Click the + CREATE HELPER button.
- Choose the type of helper you want to create (e.g., 'Toggle', 'Number', 'Text', 'Date and/or Time', 'Dropdown').
- Fill in the required details:
- Name: A descriptive name (e.g., 'Vacation Mode Toggle', 'Target Temperature').
- Icon (optional): Choose an icon to represent it in the UI.
- For
input_number
, define the Minimum, Maximum, and Step values. - For
input_select
, provide a list of Options.
- Click CREATE.
Via configuration.yaml
(For advanced users or version control)
You can define Input Helpers directly in your configuration.yaml
or a dedicated helpers.yaml
file (included via !include helpers.yaml
).
# configuration.yaml or helpers.yaml
input_boolean:
vacation_mode:
name: Vacation Mode
icon: mdi:airplane-takeoff
input_number:
target_room_temperature:
name: Target Room Temperature
min: 18
max: 26
step: 0.5
unit_of_measurement: "°C"
icon: mdi:thermometer
input_select:
house_mode:
name: House Operating Mode
options:
- Day
- Night
- Away
- Sleep
initial: Day
icon: mdi:home-variant
After adding or modifying YAML, remember to restart Home Assistant for changes to take effect.
Integrating Input Helpers into Your Automations
The real power of Input Helpers comes when you integrate them into your automations. They can act as triggers, conditions, or be manipulated by service calls.
Example 1: Conditional Lighting with input_boolean
Let's say you have an automation that turns on a light when motion is detected, but you want to disable it when guests are over or during a specific event.
automation:
- alias: 'Motion Light with Guest Override'
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_hallway
to: 'on'
condition:
- condition: state
entity_id: input_boolean.guest_mode_active
state: 'off' # Only run if guest mode is OFF
action:
- service: light.turn_on
target:
entity_id: light.hallway_light
Example 2: Dynamic Temperature Control with input_number
Allowing users to set a desired temperature via a slider on the dashboard.
automation:
- alias: 'Adjust Thermostat to Target Temperature'
trigger:
- platform: state
entity_id: input_number.target_room_temperature
action:
- service: climate.set_temperature
target:
entity_id: climate.living_room_thermostat
data:
temperature: "{{ states('input_number.target_room_temperature') | float }}"
Example 3: Mode-Based Automations with input_select
Changing the behavior of your home based on a selected 'mode'.
automation:
- alias: 'Adjust Lights based on House Mode'
trigger:
- platform: state
entity_id: input_select.house_mode
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.house_mode
state: 'Day'
sequence:
- service: light.turn_on
target:
entity_id: light.kitchen_lights
data:
brightness_pct: 70
- conditions:
- condition: state
entity_id: input_select.house_mode
state: 'Night'
sequence:
- service: light.turn_on
target:
entity_id: light.living_room_lamp
data:
brightness_pct: 30
color_temp: 350
- conditions:
- condition: state
entity_id: input_select.house_mode
state: 'Away'
sequence:
- service: script.turn_on
target:
entity_id: script.turn_off_all_lights
Best Practices for Managing a Reliable Ecosystem with Input Helpers
- Meaningful Naming: Always use clear, descriptive names for your Input Helpers (e.g.,
input_boolean.away_mode_active
instead ofinput_boolean.switch_1
). This makes your automations more readable and maintainable. - Lovelace Integration: Expose your Input Helpers on your Lovelace dashboards. Use
entities
cards,button
cards, orentity-button
cards for convenient control. Forinput_number
andinput_select
, the default entity card often provides a slider or dropdown directly. - Automate Helper States: Don't just rely on manual control. Automate the state of your Input Helpers based on schedules, presence detection, or other events. For example, set
input_boolean.vacation_mode
toon
when everyone leaves the house for an extended period. Use the serviceinput_boolean.turn_on
,input_number.set_value
, etc. - Templates for Dynamic Values: Combine Input Helpers with Jinja2 templates for highly dynamic automations. For instance, an
input_text
helper could store a custom message for a notification, which is then dynamically included in the notification service call. - Consider Initial States: For YAML configurations, use the
initial
option (e.g., forinput_select
) to define the state a helper starts in after a Home Assistant restart. For UI-created helpers, their last known state is typically restored. - Documentation: As your system grows, make notes (e.g., in markdown cards on Lovelace or external documentation) about what each Input Helper controls and its intended use.
Advanced Scenarios and Tips
- Complex Scheduling: Use
input_datetime
entities to define flexible schedules. An automation could trigger daily at the time specified byinput_datetime.morning_alarm_time
. - User-Defined Delays: Instead of hardcoding a
delay
in an automation, use aninput_number
helper. This allows you to fine-tune delays without editing YAML. - Debugging with Helpers: Use an
input_text
helper to temporarily store debug messages or variable values within an automation, making it easier to troubleshoot. - Scripts to Manage Helpers: Create scripts that set multiple Input Helper states simultaneously. For example, a 'Goodnight' script could set
input_boolean.away_mode_active
tooff
,input_number.target_temp
to 20, andinput_select.house_mode
to 'Sleep'.
By effectively utilizing Input Helpers, you transform your Home Assistant from a rigid automation engine into a truly interactive and adaptable smart home system. They empower you, the user, to make on-the-fly adjustments and override behaviors, providing a more intuitive and responsive experience. Start experimenting with them, and you'll quickly discover the depth of control they offer!

NGC 224
Author bio: