Free tools Windows power users keep installed
One-click scans. No signup required.
Use a trigger to start an automation; use a condition to decide whether a run that has already started may continue. For a numeric sensor, choose a numeric-state trigger when the event is a threshold crossing. Choose a numeric-state condition when another event—such as a schedule—starts the run and the sensor’s current value should gate the actions.
This distinction explains why a condition never starts an automation by itself, why a threshold trigger does not keep firing while a value remains high, and how to place sensor logic in Home Assistant’s editor or YAML.
As an Amazon Associate I earn from qualifying purchases.
Trigger versus condition at a glance
Home Assistant automations follow a three-part flow: When something happens, optionally check And if conditions, then execute Then actions. The automation basics documentation describes this as the structure of an automation.
| What you want the automation to do | Use | Reason |
|---|---|---|
| Start when a door, motion sensor, or other entity changes | State or device trigger | A trigger reacts to a particular event or state transition. |
| Start when a numeric reading crosses a boundary | Numeric-state trigger, or a suitable integration-specific measurement trigger | The trigger represents the moment the reading enters the configured range. |
| Run on a schedule, but only if a sensor currently meets a requirement | Time trigger plus a sensor condition | The time starts the run; the condition checks the sensor at that moment. |
| React when several values together become true | Template trigger | A template can turn a compound expression into an event when it changes from false to true. |
| Choose different actions based on current sensor checks | If-then or Choose action block | Conditional actions branch inside a run instead of deciding whether the run starts. |
Home Assistant’s trigger documentation and condition documentation define the key difference: triggers react at a specific moment, while conditions evaluate what is true when the automation reaches them.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
How an automation run is evaluated
1. A trigger starts a run
A trigger can be a state change, device event, schedule, webhook, numeric threshold crossing, or template transition. When the selected event occurs, Home Assistant creates an automation run. A trigger is not a continuous instruction. For example, a door-open trigger reacts when the door changes to open; it does not repeatedly launch runs for every second that the door remains open.
2. Conditions gate the run
After a run starts, Home Assistant evaluates its conditions. If every condition passes, the automation proceeds to its actions. If a condition fails, that run stops and no later actions execute. Conditions are checked at evaluation time, not continuously. If the sensor changes after the check, Home Assistant does not automatically re-check the earlier condition.
3. Actions perform or branch
Actions can include service calls, delays, notifications, and additional condition checks. A condition inserted between actions can stop the remaining sequence when it fails. An If-then or Choose block can instead select different action paths. The building-blocks documentation covers these placements.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choosing a state, device, or integration trigger
Not every sensor event is numeric. A state trigger is appropriate when the exact entity state or an attribute transition is the event you need to observe. A binary sensor changing to on, a door changing to open, or a sensor entering a named state can all be expressed as state-based events. This is different from asking whether the entity is currently in that state when some unrelated event occurs; the latter is a state condition.
A device trigger can expose an event in terms of the physical device rather than its entity. Use it when the device integration offers the event you need and the editor presents it clearly. For compatible measurements, the trigger chooser may also offer an integration-specific option such as a temperature or humidity threshold crossing. Home Assistant recommends these specific triggers for many devices because they can handle compatible units and integration details for you.
General state and numeric-state triggers remain useful when you need exact entity behavior, an attribute that the device trigger does not expose, or a measurement option that is not available for your integration. The choice is about the event representation, not about whether one type is universally better.
Numeric sensors: crossing a threshold or checking a current value?
Use a numeric-state trigger for a crossing event
A numeric-state trigger means “start when the value crosses into the configured above or below range.” For example, this starts when a temperature rises above 27:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →trigger:
- platform: numeric_state
entity_id: sensor.living_room_temperature
above: 27
The important word is crosses. If the sensor is already above 27 when the automation is saved or enabled, the trigger does not immediately run. It waits for the relevant state change that satisfies the trigger. Likewise, it does not launch new runs continuously while the value remains above 27.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
When the trigger editor offers a device- or integration-specific measurement trigger, Home Assistant recommends using it for compatible measurements because it can handle details such as compatible units. A general numeric-state trigger remains useful when you need exact entity behavior or no specific option fits.
Use a numeric-state condition for a current range
A numeric-state condition asks whether the value is in range when the automation reaches the check. This example allows the actions only when the temperature is above 18 and below 24:
condition:
- condition: numeric_state
entity_id: sensor.living_room_temperature
above: 18
below: 24
With both bounds supplied, the documented comparison is strict: a value exactly equal to 18 or 24 does not pass. If equality should count, choose bounds that express that requirement or use an appropriate template condition.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsSchedule first, sensor check second
Suppose a heater should be considered at 06:30 every day, even if the temperature reached the target hours earlier. A time trigger starts the run, and a numeric-state condition decides whether the heater action is appropriate:
trigger:
- platform: time
at: '06:30:00'
condition:
- condition: numeric_state
entity_id: sensor.bedroom_temperature
below: 18
action:
- service: climate.set_temperature
target:
entity_id: climate.bedroom
data:
temperature: 20
This pattern works because the schedule supplies the event. The condition reads the sensor’s current value at 06:30; it is not expected to start a run when the temperature later drops.
When a sensor check should be a template
Template trigger for a compound event
Use a template trigger when no single entity state expresses the event you care about—for example, when a machine should be considered finished only after its power draw falls below a limit while another helper indicates that a cycle is active.
trigger:
- platform: template
value_template: "{{ states('sensor.washing_machine_power') | float(0) < 5 }}"
A template trigger reacts when its rendered result changes from false to true. It therefore represents a transition into a condition, not a permanent “true” level. Entity-free templates are rendered once per minute according to the trigger documentation, so a minute-level response may be the expected behavior when the template does not reference entities that provide event updates.
Template condition for a compound gate
If a separate event should start the run, use the same kind of expression as a condition instead:
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
condition:
- condition: template
value_template: "{{ states('sensor.washing_machine_power') | float(0) < 5 and is_state('input_boolean laundry_cycle', 'on') }}"
The template condition is evaluated only when the automation reaches it. It allows the next action when the expression returns true and blocks that path when it returns false.
Check template scope before moving logic
Template support is not identical in every location. Some trigger types and trigger_variables allow only a limited template context, and many state-reading helpers are unavailable there. The Where to use templates guide lists the restrictions for each context. A template that works in the editor or as a condition may fail when copied into a restricted trigger field.
Combining several sensor conditions
All checks are required by default
A list of conditions is an AND operation: every item must pass. This is useful when an automation should run only during a time window and only when a sensor is in range.
condition:
- condition: time
after: '08:00:00'
before: '22:00:00'
- condition: numeric_state
entity_id: sensor.outdoor_temperature
below: 30
Use OR when any check is sufficient
An OR block passes when at least one nested condition passes. For example, a notification could be allowed when either of two windows is open:
condition:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.kitchen_window
state: 'on'
- condition: state
entity_id: binary_sensor.lounge_window
state: 'on'
Use NOT for deliberate negation
A NOT block inverts its nested result. It is appropriate for rules such as “continue unless the garage door is open,” but make the negated state explicit so a future change in the sensor’s available states does not create an accidental pass.
Conditions in the editor and in action sequences
Before actions: gate the whole run
Place a sensor condition in the automation’s And if section when every action should be skipped unless the check passes. A failed condition ends that run before the first action.
Between actions: stop a sequence at a checkpoint
Insert a condition as an action when an earlier action may change the situation. For example, after unlocking a door, check a presence sensor before opening a garage. The second check is evaluated at that point in the sequence; it is not the same as a condition evaluated at the beginning.
Choose or If-then: branch instead of aborting
Use If-then when there are two paths, or Choose when there are several. A heating automation might set a higher target when a room is very cold and a lower target when it is merely cool. The run continues through the selected branch rather than ending simply because one test is false.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
How to translate a requirement into the right block
Start by writing the sentence “The automation should run when …” The words that complete that sentence identify the trigger. If the sentence says “when the door opens,” “when the value crosses 27,” or “at 06:30,” that event belongs in When. Then write “It should proceed only if …” Those words identify a condition, such as a presence state, a temperature range, or a time window.
Next ask whether the sensor value must be observed at the instant of an event or tested later in the sequence. A top-level condition is evaluated after the trigger and before the first action. An action-level condition is a later checkpoint, so it can protect an action after a delay or service call. If the requirement says “do one thing when cold and another when mild,” it is not a simple pass/fail gate; use If-then or Choose.
Finally, decide what should happen when the value is already true. A trigger is appropriate when entering the state is meaningful. A condition is appropriate when the current state should be considered whenever the schedule or other event occurs. This one question prevents many “it did nothing” and “it fired at the wrong time” errors.
Recommended Free Tools
Timing, persistence, and restart behavior
A for trigger is not a persistent timer
State and numeric-state triggers can include a for duration so that a value must remain in the required state for a specified time before the trigger fires. That waiting period does not survive a Home Assistant restart or an automation reload. After either event, the timer starts over when the relevant state transition occurs.
Use an input_datetime when the deadline must survive
For a delay that must persist through restarts or reloads, Home Assistant recommends storing the target time in an input_datetime and using that helper as a trigger. This changes the design from an in-memory “wait for this state for N minutes” timer to a scheduled point that Home Assistant can restore and evaluate.
Common mistakes and the fix for each
“My condition does not start the automation”
That is expected behavior. Add a trigger for the event that should launch the run, then keep the sensor check as a condition. If the sensor becoming true is itself the event, replace the condition with a matching state, numeric-state, device, or template trigger.
“The numeric trigger did nothing because the value was already high”
A threshold trigger responds to a crossing, not to the fact that the value remains on one side of the threshold. Create a new crossing by changing the reading, or use a schedule/event trigger with a numeric-state condition when the current value should be checked regardless of when it changed.
“The action ran even though the sensor changed afterward”
Conditions are not continuously monitored after they pass. If a later sensor change must cancel or redirect the sequence, add a condition at the later point, use an If-then or Choose branch, or redesign the automation around a trigger that represents that later event.
Best Value
“My rule fires repeatedly while the state stays true”
Check whether the trigger is actually receiving repeated state changes from the integration. A normal state or threshold trigger reacts to the relevant transition; it is not a loop that fires continuously while the state remains true.
“The template works as a condition but not as a trigger”
Review the template context allowed by that trigger type in the template documentation. Replace unsupported helpers, reference entities that can provide updates, or move the expression to a condition if the event itself is supplied by another trigger.
A practical decision checklist
- Write the event that should create a run. If it is a sensor transition, schedule, device event, or webhook, it belongs in When as a trigger.
- Ask whether the sensor rule means “cross this boundary” or “is the value in this range right now.” Use a numeric-state trigger for the former and a numeric-state condition for the latter.
- If several entities must be considered together, decide whether the expression is the event (template trigger) or merely permission to continue (template condition).
- Decide whether a failed check should cancel all actions or select another path. Use a top-level condition to gate, an action condition to stop at a checkpoint, and If-then or Choose to branch.
- Check restart requirements. A
fortimer resets after restart or reload; use aninput_datetime-based design when the deadline must persist. - Prefer an integration-specific measurement trigger when Home Assistant offers one for the device and unit you use, while retaining general state or numeric-state triggers for exact or unsupported cases.
Which choice should you make?
Choose a trigger when the sensor event is the reason the automation should run. Choose a condition when some other event has already started the run and the sensor should decide whether it proceeds. For compound logic, make it a template trigger only when becoming true is the event; otherwise keep it as a template condition. This model keeps threshold crossings, current-value checks, and action branching predictable as the automation grows.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchFrequently Asked Questions
Can a Home Assistant condition start an automation when a sensor becomes true?
No. A condition only evaluates after a trigger has started a run. If the sensor becoming true is the event, use a state, numeric-state, device, or template trigger. Keep a condition when another event, such as a time trigger, should start the run.
Why did my numeric-state trigger not run when the sensor was already above the limit?
A numeric-state trigger reacts to the relevant crossing into its configured range. It does not immediately fire merely because the current value is already there, and it does not repeat while the value remains there. Use a separate event as the trigger and a numeric-state condition when you need to check the current value.
Are numeric-state condition boundaries inclusive?
With both above and below configured, the documented comparison uses strict bounds. A value exactly equal to either boundary does not pass. Express an inclusive requirement with suitable bounds or an appropriate template condition.
Should I use a template trigger or template condition for several sensors?
Use a template trigger when the compound expression becoming true is the event that should start the automation. Use a template condition when a schedule, device event, or other trigger already starts the run and the expression only decides whether actions may continue.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Will Home Assistant re-check a condition if the sensor changes during the automation?
No. A condition is evaluated when the run reaches it. If a later change must stop or redirect the sequence, add another checkpoint, use If-then or Choose, or redesign the automation around the later event.
Does a trigger’s for duration survive a restart or automation reload?
No. The waiting period for a state or numeric-state trigger resets after a Home Assistant restart or automation reload. When the deadline must persist, Home Assistant recommends storing a target time in an input_datetime and triggering from that scheduled value.
The Bottom Line
Trigger means start; condition means gate. Use numeric-state triggers for threshold crossings, numeric-state conditions for current-value checks, template triggers for compound events, and If-then or Choose for branching. Remember that conditions are not continuously re-evaluated and for timers reset after restart or reload.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

