What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Use a trigger to start an automation; use a condition to decide whether that already-started run may continue. For a numeric sensor, choose a numeric-state trigger when crossing a threshold is the event you want. Choose a numeric-state condition when another event—such as a schedule, motion, or button press—should start the run and the sensor’s current value should act as a gate.
This distinction prevents the most common design error in Home Assistant: expecting a condition to launch an automation. Conditions are evaluated only after a trigger fires. They can also be inserted between actions or used in If-then and Choose blocks to branch inside a run.
The core difference: a trigger starts, a condition gates
Every Home Assistant automation has the same practical flow: a When event starts a run, optional And if checks are evaluated, and the actions then execute. Home Assistant describes triggers as reactions to a particular event or moment, while conditions check what is true when the automation reaches them. See the official explanations of automation building blocks, triggers, and conditions.
- Trigger: starts an automation run when a state change, threshold crossing, schedule, event, or template transition occurs.
- Condition: evaluates the current situation during that run and either lets the next step proceed or stops that path.
- Action: performs the service call, notification, scene activation, or other work after the trigger and any required conditions have passed.
If your requirement can be phrased as “start when …,” it belongs in a trigger. If it can be phrased as “only continue if …,” it belongs in a condition.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Choose by the event you want to represent
| Intended behavior | Use | Reason |
|---|---|---|
| Start when a door, window, motion sensor, or other entity changes | State or device trigger suited to that event | The automation reacts to an event or state transition. |
| Start when a numeric reading crosses a boundary | Numeric-state trigger, or a compatible integration-specific measurement trigger | The crossing is the event that starts the run. |
| Run at a set time, but only when a sensor currently meets a requirement | Time trigger plus a sensor condition | The schedule starts the run; the condition checks the value at that moment. |
| React when several readings together become true | Template trigger, where appropriate | A template can turn a compound expression into a false-to-true event. |
| Select different actions according to current sensor values | If-then or Choose in the action sequence | Conditional action blocks branch within a run instead of starting a new one. |
The visual editor may offer an integration-specific option such as a temperature-threshold trigger. Home Assistant recommends those options for compatible devices and measurements because they can handle details such as units. Use a general state or numeric-state trigger when you need an exact state or attribute, or when no specialized option fits. The available choices depend on the integration and the version of Home Assistant you run.
Numeric sensors: crossing a threshold versus checking a range
Use a numeric-state trigger for a crossing
A numeric-state trigger represents a moment when a sensor enters the configured range. For example, this starts when the temperature rises above 27 °C:
alias: Start cooling when temperature rises
triggers:
- trigger: numeric_state
entity_id: sensor.living_room_temperature
above: 27
actions:
- action: climate.set_hvac_mode
target:
entity_id: climate.living_room
data:
hvac_mode: cool
The trigger reacts to the transition into the range; it is not a continuously running rule. If the sensor is already above 27 when you save or reload the automation, no crossing has occurred at that moment, so the automation waits for a relevant change. It also does not fire repeatedly while the value remains above the boundary.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →You can require the value to remain in the range for a duration with the trigger’s for option:
triggers:
- trigger: numeric_state
entity_id: sensor.living_room_temperature
above: 27
for: '00:05:00'
This means the reading must satisfy the threshold continuously for five minutes before the run starts. A for timer is lost when Home Assistant restarts or when the automation is reloaded. If the delay must survive those events, store the target time in an input_datetime and trigger from that helper, as recommended in the trigger documentation.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
Use a numeric-state condition for the current value
A numeric-state condition does not create an event. It checks the sensor when an unrelated trigger has already started the automation. This pattern runs at 08:00 and turns on heating only if the current temperature is below 19 °C:
alias: Morning heating check
triggers:
- trigger: time
at: '08:00:00'
conditions:
- condition: numeric_state
entity_id: sensor.living_room_temperature
below: 19
actions:
- action: climate.set_hvac_mode
target:
entity_id: climate.living_room
data:
hvac_mode: heat
The condition is evaluated at the scheduled run. If the temperature is 18.5 °C, the action can proceed; if it is 20 °C, that run stops. The condition is not rechecked automatically if the sensor changes after evaluation.
Recommended Free Tools
Require a value inside a range
Set both above and below on a numeric-state condition when a value must remain within limits:
conditions:
- condition: numeric_state
entity_id: sensor.humidity
above: 35
below: 60
The documented comparison uses strict bounds: exactly 35 or exactly 60 does not satisfy this example. If equality matters, choose thresholds that reflect the boundary you actually want, or use a template condition with explicit comparison operators.
Common sensor designs and the correct placement
Motion starts the run; light level decides whether to act
Use motion as the trigger and illuminance as a condition when lights should turn on only in a dark room. Motion is the event; the lux reading is the permission check. If the room is bright when motion occurs, the run ends without turning on the light. A later change to darkness will not cause that old run to resume; motion must trigger another run.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
alias: Hall light on when dark
triggers:
- trigger: state
entity_id: binary_sensor.hall_motion
to: 'on'
conditions:
- condition: numeric_state
entity_id: sensor.hall_illuminance
below: 20
actions:
- action: light.turn_on
target:
entity_id: light.hall
A door event starts the run; temperature prevents an unsuitable action
If opening a greenhouse door should notify you only when the temperature is outside a safe range, the door belongs in the trigger and temperature belongs in the condition. This keeps the notification tied to the door event rather than to every temperature update.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteA schedule starts the run; several sensors must pass
Home Assistant evaluates multiple top-level conditions as an AND group by default: every condition must pass. A scheduled ventilation check could require both high carbon dioxide and someone being home. If either check fails, the actions do not run. Use an or condition when any one of several checks is sufficient, and a not condition when the desired logic is negation. The condition syntax and grouping options are documented in Conditions.
conditions:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.co2
above: 1000
- condition: state
entity_id: person.alex
state: home
One trigger, different outcomes
Use an If-then or Choose action when the same event should lead to different actions. For example, motion can trigger one run; a Choose block can select a bright-light scene when illuminance is low and a notification when it is not. This is different from creating separate triggers: the event is shared, but the action path branches according to conditions. Home Assistant’s automation and script building blocks describe these action-level choices.
Template triggers and template conditions
Turn a compound expression into an event
A template trigger is appropriate when no single entity represents the event. For instance, you might want to react when a washing machine’s power draw falls into an idle range after it has been running. The template expresses the combined rule and the automation starts when the rendered result changes from false to true:
alias: Washing machine finished
triggers:
- trigger: template
value_template: >-
{{ states('sensor.washing_machine_power') | float(0) < 3 }}
actions:
- action: notify.notify
data:
message: Washing machine cycle may be finished
The official trigger guidance explains that template triggers react to a recognized state change that makes the template change from false to true. An entity-free template is rendered once per minute, so it is not an instantaneous, continuously sampled event. Prefer entity references that Home Assistant can track when practical.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Use a template condition to gate an existing event
If a time, motion, or button event should start the run and a compound expression should merely allow it, put the same kind of logic in a template condition:
conditions:
- condition: template
value_template: >-
{{ states('sensor.indoor_temperature') | float(0) > 18
and states('sensor.outdoor_temperature') | float(0) < 10 }}
A template condition is evaluated only when the automation reaches it. It returns true to continue and false to stop that path. It does not watch the expression for a later change and it does not start a new run.
Mind template scope
Template availability is not identical in every location. Some trigger types and trigger_variables contexts permit only limited templates, and many state-reading helpers are unavailable there. A template that works in the editor or in an action may fail in a restricted trigger context. Check the scope described for the specific feature in Where to use templates before relying on a helper or variable.
Conditions can appear before actions or between them
Top-level conditions gate the entire action sequence. You can also place a condition in the action list when later actions should run only if a check still passes at that point:
actions:
- action: light.turn_on
target:
entity_id: light.office
- condition: state
entity_id: binary_sensor.window_office
state: 'off'
- action: climate.set_hvac_mode
target:
entity_id: climate.office
data:
hvac_mode: cool
In this example, the light action occurs first. If the window is open when the sequence reaches the condition, the run stops before the climate action. This is useful when an earlier service call can change the situation or when a long sequence needs a safety check before a later step.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Use If-then or Choose instead when a failed check should select another action rather than terminate the remaining sequence. The placement rules and action blocks are covered in the scripts documentation.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How to build the automation in the visual editor
Labels can vary slightly between Home Assistant releases and integrations, but the workflow follows the When, And if, Then structure.
- Open Settings → Automations & Scenes and create a new automation, or open an existing one for editing.
- Under When, choose the event that should start the run. Pick a device or integration-specific trigger when it accurately describes the measurement; otherwise choose State, Numeric state, Time, or Template as appropriate.
- For a threshold-crossing requirement, configure the numeric trigger’s entity and Above or Below value. Add For only when the reading must remain in range for a duration.
- Under And if, add checks that must be true at run time. Use a Numeric state condition for a current range, a State condition for an exact state, and Or or Not groups for different logic.
- Under Then do, add the service, scene, notification, or other action. If different outcomes are required, insert If-then or Choose instead of duplicating the trigger.
- Save the automation, then use the automation’s trace or run it manually with known test states. Verify the trigger event and each condition result separately.
If the editor offers a specialized measurement trigger, it may normalize compatible units for you. A general numeric-state trigger is still appropriate when you need exact control over an entity or attribute.
Free tools Windows power users keep installed
One-click scans. No signup required.
Timing, restart, and state-change caveats
A condition is a point-in-time decision
Conditions are not subscriptions. Once Home Assistant evaluates a condition, a later sensor update does not cause that condition to run again. If the action must happen when the sensor eventually reaches a value, make that value change the trigger instead.
A trigger is not a continuous truth rule
A door-open or above-threshold trigger reacts when the entity changes into the matching state. It does not repeatedly fire while the door remains open or the reading remains high. To perform periodic checks, use a time-pattern or time trigger and place the sensor test in a condition.
The for timer is volatile
A trigger’s for duration resets on Home Assistant restart and automation reload. For persistence across those events, calculate and store a future timestamp in an input_datetime, then trigger from that helper rather than relying only on for.
Unavailable and nonnumeric readings
Numeric comparisons require a numeric state. Sensors can temporarily report unknown or unavailable, or may include units and attributes you did not intend to compare. Confirm the entity’s state in Developer Tools before choosing the entity and attribute. If a conversion is necessary, use a template that supplies a safe default and explicitly decide how an unavailable reading should behave; do not silently treat a missing value as a valid measurement.
Troubleshooting: why the automation did not run
| Symptom | Likely design or configuration issue | Correction |
|---|---|---|
| The condition became true, but nothing started | A condition was used as though it were a trigger. | Add a trigger that represents the event, such as a state, numeric-state, time, or template trigger. |
| The numeric trigger never fired after the automation was saved | The sensor was already on the matching side of the threshold; no crossing occurred. | Move the current-value test to a condition on a schedule, or wait for the value to cross the boundary. |
| The automation fires only once | The entity changed into the target state once and then stayed there. | Use a periodic trigger for recurring checks, or identify the separate event that should cause another run. |
| An action ran even though the sensor later changed | The condition was evaluated earlier and is not automatically rechecked. | Add a second condition immediately before the sensitive action, or redesign the sequence around the later event. |
A five-minute for trigger was lost |
Home Assistant restarted or the automation was reloaded during the timer. | Use an input_datetime-based persistent schedule if the delay must survive those events. |
| A template works in one place but not another | The trigger context has a narrower template scope. | Check the supported functions for that trigger and move complex state logic into a supported template or condition. |
| A range check behaves unexpectedly at the endpoint | Numeric-state bounds are strict in the documented example. | Account for equality explicitly by adjusting the threshold or using a template comparison. |
| A numeric condition always fails | The selected entity is unavailable, nonnumeric, or the value is stored in an attribute. | Inspect the state and attributes, select the correct entity or attribute, and handle unavailable states deliberately. |
A practical decision checklist
- Can you name the event that should start the run? Put that event in When.
- Is the sensor reading itself the event, specifically a crossing into an above or below range? Use a numeric-state or compatible device trigger.
- Should another event start the run even when the sensor is already in range? Use that event as the trigger and the sensor as a condition.
- Does the rule combine several entities into one event? Consider a template trigger; use a template condition if the expression only gates an existing run.
- Must every check pass, only one check pass, or the logic be inverted? Use the default AND behavior, an OR group, or NOT accordingly.
- Do later actions need a fresh safety check? Place a condition between actions or use an If-then or Choose branch.
- Must a delay survive restart or reload? Do not rely solely on a trigger’s
foroption; use aninput_datetime-based design. - Are units, attributes, unavailable states, and template scope understood for this entity and integration?
Bottom line
Design the automation around the distinction: trigger equals start; condition equals gate. A threshold crossing belongs in a numeric-state trigger, while a current sensor value that qualifies a scheduled or event-driven run belongs in a numeric-state condition. Use template triggers for compound expressions that should become events, template conditions for compound gates, and action-level conditions or Choose blocks when one run needs multiple decision paths.
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.

