github ScratMan/HASmartThermostat 2026.12.1-dev-alpha1
🧪 Pre-release: Advanced Deadbands & Overshoot Protection

pre-release12 minutes ago

This pre-release introduces three advanced parameters designed to smooth out PID behavior, reduce mechanical wear on analog actuators (thermostatic valves/TRVs), and prevent unwanted room overheating.

⚠️ Alpha / Beta Release: This version is intended for testing. Please report any feedback or anomalies directly in the repository's Issues tab!


🆕 What's New

1. 🛡️ Overshoot Protection (overshoot_protection)

Bypasses the minimum ON cycle duration (min_cycle_duration) if the room temperature exceeds the setpoint while the PID controller output drops to zero ($0%$).

2. 🎯 Temperature Error Deadband (error_deadband)

Creates a neutral zone around the setpoint: ignores micro-fluctuations from temperature sensors to freeze the Integral term ($I$) and zero out the Proportional term ($P$).

3. ⚙️ Actuator Output Deadband (output_deadband)

Establishes a minimum change threshold for analog actuators (proportional valves, number/valve entities). Reduces unnecessary network traffic (Zigbee/Z-Wave) and mechanical wear caused by tiny output adjustments.


🛠️ YAML Configuration Example

climate:
  - platform: smart_thermostat
    name: "Living Room Thermostat"
    heater: input_number.living_room_valve
    target_sensor: sensor.living_room_temperature
    target_temp: 20.0
    kp: 30.0
    ki: 0.005
    kd: 100.0

    # New Parameters
    overshoot_protection: true   # Forces immediate shutoff if T° > setpoint & PID = 0%
    error_deadband: 0.2          # Treats temperature error as zero between 19.8°C and 20.2°C
    output_deadband: 3.0         # Only sends valve updates if output change is >= 3.0%

👥 Testing & Feedback

Feedback welcome on:

  • TRV/valve behavior when using output_deadband (network stability & responsiveness).
  • Integral ($I$) stability when maintaining room temperature inside error_deadband.
  • Immediate PWM switch cut-off behavior with overshoot_protection.

Parameter Guide: Why & How to Use Them

1. overshoot_protection (Boolean — Default: false)

  • Why use it?
    By default, when a minimum ON duration is set (min_cycle_duration), the thermostat prevents the heater from turning off until the timer elapses. If the room temperature spikes above setpoint (e.g., due to solar gain or cooking) and the PID demands $0%$ heating, the heater would remain locked ON until the timer expired, amplifying overheating.

  • How it works:
    When enabled (true), if the current temperature exceeds the setpoint (in Heating mode) AND the PID output drops to $0%$, the minimum ON cycle duration is bypassed, and an immediate shutoff command ($0%$ or turn_off) is sent to the actuator.

  • When to enable it:
    Enable this option if you use a high min_cycle_duration (e.g., 2 to 5 minutes to protect a boiler or pump) but still require immediate cut-off protection upon temperature overshoot.


2. error_deadband (Float in °C — Default: 0.0)

  • Why use it?
    Temperature sensors often exhibit minor measurement noise ($\pm 0.05^\circ\text{C}$ to $\pm 0.1^\circ\text{C}$). When ambient temperature matches the setpoint, these micro-oscillations create spurious error signals that drive the Proportional term ($P$) and cause integral windup/hunting ($I$).

  • How it works:
    When $|T_{\text{target}} - T_{\text{current}}| \le$ error_deadband, the error value passed to the PID algorithm is forced to 0.0.

    • Effect on $P$: $P = K_p \times 0 = 0$.
    • Effect on $I$: Integration pauses ($\Delta I = 0$), holding the baseline heat output steady without drifting.
  • How to tune it:

    • Recommended value: 0.1 to 0.3 °C.
    • Example: With a setpoint of $20.0^\circ\text{C}$ and error_deadband: 0.2, any temperature between $19.8^\circ\text{C}$ and $20.2^\circ\text{C}$ is evaluated as a perfect match with zero error.

3. output_deadband (Float in % — Default: 0.0)

  • Why use it?
    For analog actuators (0-100% TRVs, motor valves, number entities), the PID recalculates an output on every sensor update (e.g., shifting from $24.2%$ to $24.8%$). Sending these tiny adjustments leads to:

    1. Excessive wireless network traffic (flooding Zigbee/Z-Wave meshes).
    2. Premature mechanical wear on valve motors and gears.
    3. Faster battery drain on wireless smart TRVs.
  • How it works:
    output_deadband defines a minimum change threshold. If the difference between the new PID output and the last value sent to the actuator is smaller than the threshold ($|\Delta| <$ output_deadband), the command is suppressed.

    🛑 Safety Exception: Full shutoff ($0%$) and full open ($100%$) commands always bypass this threshold to ensure immediate safety response at boundaries.

  • How to tune it:

    • Recommended value: 2.0 to 5.0 %.
    • Example: With output_deadband: 3.0 and a valve currently sitting at $20%$, the thermostat will hold off sending a new command until the PID output moves up to at least $23%$ or down to $17%$.

Full Changelog: 2026.12.0-beta4...2026.12.1-dev-alpha1

Don't miss a new HASmartThermostat release

NewReleases is sending notifications on new releases.