Start with the status you want to see
A Home Assistant Threshold helper is a good choice when a reading hovers near one boundary and your yes/no decision keeps flipping. Instead of changing a “high humidity” status every time the reading moves from 59 to 61 and back, give it different points for entering and leaving that status.
That gap is called hysteresis. The output is a binary sensor: an entity, or named reading in Home Assistant, whose normal states are on and off. “On” means your chosen condition is active. It does not mean a fan, heater or plug has turned on.
First choose whether you mean high, low or inside a range. Then calculate the limits, create the helper, and verify its behavior using the harmless example below. Keep the original reading visible beside the new status.
Researched from Home Assistant documentation and Core 2026.10.4 source on October 28, 2026. We checked the example’s boundary calculations by executing the upstream update method in isolation. We did not test the Home Assistant UI, a physical sensor or appliance control. The cover is an AI-generated residential illustration.
1. Choose high, low or in-range behavior
On a narrow screen, scroll sideways to read every column.
| Desired status | Fields to use | Meaning of on |
|---|---|---|
| A reading is high | Upper limit and hysteresis; leave Lower limit empty. | The reading has crossed the high-side switching point. |
| A reading is low | Lower limit and hysteresis; leave Upper limit empty. | The reading has crossed the low-side switching point. |
| A reading is inside an acceptable range | Both limits, with hysteresis around the edges. | The reading is in the selected range, with retained state near its edges. |
The official Threshold matrix describes all three modes. For a high-humidity status that turns on high and clears low, choose the first row. Entering 55 as Lower and 65 as Upper would answer a different question: whether the reading is in a range.
If you want a smoother number instead, use our Filter sensor walkthrough. Filtering changes the reading; hysteresis changes the decision made from it. Neither makes a faulty sensor accurate.
2. Calculate the two switching points
For this learning example, the status should become active above 65% and clear below 55%. These are demonstration values, not a recommended humidity target for every home.
Limit = (65 + 55) ÷ 2 = 60
Hysteresis = (65 − 55) ÷ 2 = 5
Use Upper limit 60, Hysteresis 5, and leave Lower limit blank. Hysteresis is the distance on each side of the limit, so the full gap is 10 percentage points. It is not five seconds or five percent of the current reading. Use the source sensor’s numeric scale: a sensor reporting 0–1 would need different numbers.
With these settings, equality alone does not switch the status: 65 is not above 65, and 55 is not below 55. The checked 2026.10.4 implementation uses strict comparisons. The sequence below makes that difference visible.
For a real sensor, open Settings → Devices & services → Helpers → Create helper → Threshold. Give the status an unambiguous name, select its numeric sensor, enter the settings, and save. The built-in helper needs no paid license or extra app; your source device still has its own connection requirements. Rehearse with test helpers first if these settings are new to you.
3. Build a harmless test slider
This rehearsal changes only newly created helpers. Do not attach them to an appliance automation or add them to a label or group that existing routines control. An account allowed to create helpers is required.
- Create a Number helper. Under Settings → Devices & services → Helpers → Create helper → Number, name it Threshold demo input. Set minimum 0, maximum 100 and step 1. A numeric input box is convenient for exact values. Save, note its actual entity ID, and set its value to 54.
- Create a Template sensor helper. Choose Create helper → Template → Sensor (some releases say “Template a sensor”). Name it Threshold demo reading. In State, paste the first expression below, replacing the example ID if yours differs. Set Unit of measurement to %. Under Additional options, set Availability to the second expression. Leave Device class and State class unset for this rehearsal.
- Create the Threshold helper. Choose Create helper → Threshold. Name it Threshold demo high, select the new sensor.threshold_demo_reading or its actual ID, and enter Upper 60 and Hysteresis 5. Leave Lower empty.
- Show all three helpers together. Put the number control, template reading and binary status on a dashboard. Confirm the template reading follows the number control and initially shows 54, while the Threshold status is off.
On a phone, scroll sideways inside each code box and copy the whole expression.
Template sensor: State
{{ states('input_number.threshold_demo_input') | float(none) }}Template sensor: Availability
{{ is_number(states('input_number.threshold_demo_input')) }}The middle helper is necessary because the current Threshold UI selects sensor entities, not input_number entities. This is confirmed by the 2026.10.4 configuration flow. The Number helper supplies a value you control; the Template helper exposes it as a sensor.
float(none) converts numeric text without inventing zero when conversion fails. Availability checks whether the input is numeric. Keep both expressions: a missing test input should not become a believable 0% reading. The type-conversion guide explains these fallbacks.
4. Walk through the values in this order
Enter each number and wait until the template reading shows it before moving to the next row. The earlier rows matter: the same value can legitimately produce different states depending on which boundary was crossed last.
Expected results from the checked calculation, not measurements from physical hardware. Scroll sideways on a narrow screen.
| Step | Input | Expected status | Why |
|---|---|---|---|
| 1 | 54 | Off | Below the clearing point. |
| 2 | 60 | Off | Inside the gap; retains off. |
| 3 | 65 | Off | Exactly at the upper switching boundary. |
| 4 | 66 | On | Above 65; activates the status. |
| 5 | 60 | On | Inside the gap; now retains on. |
| 6 | 55 | On | Exactly at the lower switching boundary. |
| 7 | 54 | Off | Below 55; clears the status. |
A pass means the template follows every entered value and the status matches every row. If it does not, stop before connecting a real routine and use the checks below. You can remove the three demo helpers afterward, once you have removed their dashboard cards and confirmed nothing else uses them. No history deletion, sensor disconnection or household restart is needed.
When the result looks wrong
Scroll sideways to read every column.
| Observation | Likely check | Next step |
|---|---|---|
| The test slider is missing from Input sensor | It is an input_number, not a sensor. | Select the Template sensor created in step 2 of the rehearsal. |
| On means “inside the band” | Both limit fields are filled. | For the high-status example, keep only Upper 60 and Hysteresis 5. |
| 60 gives different answers on different passes | The last crossed boundary differs. | Repeat the sequence from 54. Retaining state inside the gap is intentional. |
| The template does not follow the input | Actual entity ID and both expressions. | Check the Number helper’s ID against the pasted text; then inspect the template preview. |
| The original sensor is unknown or unavailable | No usable source reading. | Check the device connection. Do not treat the derived status as “all clear.” |
| A fan still switches even though the helper is steady | The automation may use the original sensor or another controller. | Read its trace and targets. Creating a helper does not change existing routines. |
In the checked version, a nonnumeric or unavailable source makes Threshold unknown, rather than off. See Home Assistant’s state definitions. For a reading that stays wrong, our template troubleshooting guide follows the input and update path.
Keep restart and appliance behavior separate
Do not rely on the helper remembering its old side of the gap after a restart or reload. In Core 2026.10.4, a newly initialized single-limit helper starts off when its input is inside the hysteresis band. The same reset occurs after an unknown input: if this example returns at 60, it becomes off even if it was on before the interruption. That is source-checked behavior, not a promise of persistent memory.
Start by using the helper as a dashboard status. To act on it, an automation must explicitly watch its changes. Triggers react at a moment; saving an automation while the status is already on is not equivalent to a new off-to-on transition.
Hysteresis is also different from requiring a condition to remain true for a duration. Neither alone validates a heater or compressor controller. Preserve equipment protections and manual controls. If your next step is controlling a dehumidifier, use the separate dehumidifier guide for quiet hours, power-switching limits and recovery checks.
Common questions
Can I use a template or another helper as the limit?
The checked Threshold UI expects numeric limit values, not a template expression or another entity ID. Use it for fixed boundaries. An adjustable target needs a different design; do not paste template text into the limit box and assume it will update.
Does this work locally?
The helper’s calculation runs in Home Assistant. Its usefulness during an internet outage still depends on where the input reading comes from. A locally calculated status cannot replace updates that a cloud-dependent sensor stops delivering.
For a household plan that documents sensor inputs, normal behavior and exceptions together, see Tara’s home automation kit for coordinated local routines.
