Heating control
Home Assistant Generic Thermostat: room heating and hysteresis
November 8, 2026
Build a thermostat with an external temperature sensor and heater switch in Home Assistant. Learn the helper settings, on and off thresholds, and ways to prevent rapid cycling.
Prepare a room sensor and a controllable switch
Home Assistant’s Generic Thermostat combines a temperature sensor with one switch that controls a heater. Before configuring it, confirm that the sensor reliably reports the temperature for the room and that the switch controls compatible heating equipment. For room measurements, place the sensor where it reflects typical room conditions, away from direct sunlight and localized hot air.
Check the sensor state in Home Assistant: it should be a numeric temperature, not unavailable or text. Manually test the switch to confirm it controls the intended zone. If the equipment has its own thermostat or built-in safety controls, keep those active and operate within the manufacturer’s limits.
Create a Generic Thermostat helper
In Home Assistant, go to Settings → Devices & services → Helpers → Create helper and select Generic Thermostat. Enter a room name, heater, and target sensor. After saving, a climate entity appears where you can set the target temperature and choose heat or off. If you need cooling, configure it separately with the correct mode.
One Generic Thermostat can control only one switch. If a zone has multiple circuits or relays, do not assume the thermostat will synchronize them automatically; the control design must support that setup. The visual helper includes common options, while advanced settings such as minimum cycle duration and cooldown are available in the YAML configuration.
Set hysteresis for steady operation
With a target of 21 °C and cold and hot tolerance both set to 0.3 °C, Generic Thermostat in heating mode starts the heater below 20.7 °C and turns it off when the temperature reaches about 21.3 °C. The gap between these thresholds is hysteresis: it prevents rapid relay switching when readings fluctuate around the target.
These values are a starting example, not a universal recommendation. If the room overshoots the target or heats unevenly, check sensor placement and update frequency, heater response, and tolerance settings. Thresholds that are too narrow can cause short cycles; thresholds that are too wide can create noticeable comfort swings.
Limit cycles and verify the behavior
For equipment that should not switch frequently, you can configure a minimum cycle duration or a cooldown before the next start. In Generic Thermostat, minimum cycle duration sets how long the switch must stay on before it can turn off, while cycle cooldown sets the minimum wait before it can turn on again. Choose these values according to the heater and relay documentation: a long minimum cycle can keep heating after the room has reached a comfortable temperature.
After setup, watch the temperature graph and switch state for several cycles. Test manual off, what happens if the sensor becomes unavailable, and the automation traces. Avoid parallel automations that independently switch the same heater; they can make thermostat behavior unpredictable. Mains wiring must meet the equipment ratings and should be installed by a qualified professional when needed.
- Generic Thermostat combines one temperature sensor with one heater switch.
- Cold and hot tolerance set separate turn-on and turn-off thresholds.
- A small hysteresis band reduces rapid switching around the target temperature.
- Cycle timing and temperature limits should match the equipment you control.