Skip to content

Temperature Linear

The Temperature Linear module provides a simple three-zone mapping from temperature to fan speed. Define your temperature thresholds and fan speed percentages, and the controller handles the rest — no complex tuning required.

Choose Linear when you want straightforward temperature-based fan control without the complexity of PID tuning or multi-point curves. It works well for most home and office setups where you just need fans to ramp up as temperature rises.

For more precise temperature targeting, consider Temperature PID. For finer control over the speed curve shape, see Temperature Curve. The modules overview has a comparison table.

VariableDefaultDescription
friendly_name"Fancontroller"Device name prefix for all entities
t_off"25.0"Temperature below which fans turn off (C)
t1"30.0"Lower temperature setpoint (C)
t2"50.0"Upper temperature setpoint (C)
fanpercent1"30.0"Fan speed at t1 (%)
fanpercent2"100.0"Fan speed at t2 and above (%)

The module divides temperature into four zones:

ZoneTemperature RangeFan SpeedBehavior
OffBelow t_off0%Fans completely off
Constant lowt_off to t1fanpercent1Fans run at a fixed low speed
Rampt1 to t2fanpercent1 to fanpercent2Linear ramp between the two speeds
Constant highAbove t2fanpercent2Fans run at maximum configured speed

With the defaults (t_off=25, t1=30, t2=50, fanpercent1=30%, fanpercent2=100%):

  • Below 25 C: fans off
  • 25-30 C: fans at 30%
  • 30-50 C: fans ramp linearly from 30% to 100%
  • Above 50 C: fans at 100%
EntityRangeStepUnitDefaultDescription
Linear Off Temperature20 — 500.5C25.0Temperature below which fans stop
Linear T120 — 500.5C30.0Lower temperature setpoint
Linear T220 — 500.5C50.0Upper temperature setpoint
Linear Fan Percent 10 — 1001%30Fan speed at T1
Linear Fan Percent 20 — 1001%100Fan speed at T2 and above
EntityUnitDescription
Linear Output%Current calculated fan speed (updated every 10s)
EntityDefaultDescription
Auto Control Fan 1ONEnable linear control for fan 1
Auto Control Fan 2ONEnable linear control for fan 2
Auto Control Fan 3ONEnable linear control for fan 3
Auto Control Fan 4ONEnable linear control for fan 4
packages:
temperature_linear:
url: https://github.com/zeroflow/wifi-fancontroller
ref: main
files:
- path: modules/temperature_linear.yaml
vars:
friendly_name: "My Fan Controller"
packages:
temperature_linear:
url: https://github.com/zeroflow/wifi-fancontroller
ref: main
files:
- path: modules/temperature_linear.yaml
vars:
friendly_name: "Desktop Cooler"
t_off: "28.0"
t1: "32.0"
t2: "45.0"
fanpercent1: "20.0"
fanpercent2: "80.0"

This profile keeps fans off until 28 C, starts at a quiet 20%, and caps at 80% for reduced noise.

  • Adjust t_off based on ambient temperature — if your room is normally 24 C, setting t_off to 25 C means fans only spin when something is actively generating heat
  • Set fanpercent1 to your fans’ minimum reliable speed — most fans need at least 20-30% PWM to start spinning consistently. Check the troubleshooting guide if fans stutter at low speeds.
  • Use the HA number entities to fine-tune — all five parameters can be adjusted live from Home Assistant without reflashing
  • Watch the Linear Output sensor — it shows the current calculated fan speed percentage, helpful for verifying your thresholds behave as expected