This custom component for Home Assistant will add crucial features to your climate-controlling TRV (Thermostatic Radiator Valves) to save you the work of creating automations to make it smart. It combines a room-temperature sensor, window/door sensors, weather forecasts, or an ambient temperature probe to decide when it should call for heat and automatically calibrate your TRVs to fix the imprecise measurements taken in the radiator's vicinity. https://better-thermostat.org
  • Python 98.5%
  • TypeScript 1.1%
  • Astro 0.2%
Find a file
2026-11-14 00:17:11 +01:00
.devcontainer chore: update the development toolchain 2026-10-05 23:47:37 +02:00
.github Merge remote-tracking branch 'origin/develop' into chore/home-assistant-2026-11 2026-11-13 14:29:26 +01:00
.vscode 1.9.0 (#2070) 2026-08-21 20:07:02 +02:00
assets 1.9.0 (#2070) 2026-08-21 20:07:02 +02:00
blueprints fix: set the fire preset at start even when every pause switch is already on 2026-10-22 03:27:25 +02:00
custom_components Update version to 2.0.0 in manifest.json 2026-11-13 22:47:54 +01:00
docs Fix Home Assistant version formatting in docs 2026-11-13 22:05:10 +01:00
scripts Merge remote-tracking branch 'origin/develop' into ci/ha-dev-smoke 2026-11-03 00:59:11 +01:00
tests test: start the offset-limit test clock on a whole second 2026-11-13 23:53:49 +01:00
website feat: optimize website for SEO, LLMs, and accessibility 2026-11-13 22:01:18 +01:00
.blind-except-budget.json fix: name the device boundaries that keep a broad handler, inline 2026-10-06 10:01:21 +02:00
.coderabbit.yaml chore: let Dependabot propose monthly action and lock file updates on develop 2026-11-02 16:52:17 +01:00
.coverage-floors.json feat: report a calibration offset that stays at the limit of its range (#2944) 2026-11-13 16:39:57 +01:00
.editorconfig black: change editorconfig from tab to spaces 2022-05-05 17:19:31 +02:00
.forward-port-gaps.json chore: record calibration docs forward-port gap 2026-11-13 22:44:50 +01:00
.gitignore Merge branch 'develop' into feat/update_website 2026-11-13 19:28:46 +01:00
.pre-commit-config.yaml chore: update the development toolchain 2026-10-05 23:47:37 +02:00
.python-version chore: bump dependencies to their latest releases 2026-11-13 12:20:07 +01:00
.restated-contract-budget.json refactor: give every TRV of a group the group's valve command 2026-10-26 11:15:46 +01:00
.yamllint chore: gate YAML on yamllint and drop codespell 2026-08-22 15:56:34 +02:00
AGENTS.md refactor: spell out the remaining word parts in the tests, empty the naming budget 2026-10-09 11:12:01 +02:00
CONTRIBUTING.md Merge remote-tracking branch 'origin/develop' into ci/ha-dev-smoke 2026-11-03 00:59:11 +01:00
glossary.toml refactor: drop the MPC v2 flow temperature option 2026-10-26 09:02:11 +01:00
hacs.json chore: require Home Assistant 2026.11 and test with pytest-homeassistant 2026-11-13 12:56:01 +01:00
LICENSE add a license to make this project open-source (not only have publically available source code) 2022-01-19 17:00:31 +01:00
project.inlang.json Add support for Simplified Chinese 2026-10-31 15:40:04 +08:00
pyproject.toml Bump version to 2.0.0 2026-11-13 23:03:50 +01:00
README.md Merge branch 'develop' into feat/update_website 2026-11-13 19:28:46 +01:00
uv.lock [TASK] sync 2026-11-13 23:06:07 +01:00

Better Thermostat

Active installations GitHub issues Version Discord hacs_badge

Full documentation & Interactive Configurator: https://better-thermostat.org/

What is Better Thermostat?

  1. Fixes the physical radiator sensor flaw: Every smart radiator thermostat (TRV) measures temperature millimeters away from its own 55–70 °C hot water pipe, causing it to read several degrees too warm and shut off while your room is still cold.
  2. Replaces expensive proprietary ecosystems & subscriptions (Bosch, tado°, etc.): Commercial ecosystems lock you into 50–80 € brand-specific room sensors, proprietary bridges, and paid subscriptions for basic features like open-window shutoff. Better Thermostat is 100 % free, local (as far as your devices and integrations run locally—tado° setups rely on tado°'s internet API), and subscription-free—letting you combine any TRV brand with any room temperature, window, door, or outdoor sensor in Home Assistant with the same or an even more advanced feature set.

Better Thermostat wraps one or more radiator valves (plus an optional air-conditioning cooler) and a separate room temperature sensor into one smart virtual climate entity in Home Assistant. It regulates your room accurately through whichever hardware channel each TRV supports (Direct Valve 0–100 %, Local Offset, or Target Setpoint), pauses heating for open windows and doors, shuts off automatically during warm weather, and protects TRV batteries by spacing radio writes.

Requirements

  • Minimum required Home Assistant version: 2026.11.0 (continuously tested against Home Assistant Tested Home Assistant version)
  • At least 1 radiator/wall thermostat (climate.*) and 1 separate room temperature sensor (sensor.*) per room.

Companion UI Card

Display open-window status, Summer Mode, ambient humidity, and heating/cooling state with our companion frontend card via HACS: better-thermostat-ui-card (note: in UI Card v3.0+, use custom:better-thermostat-normal-climate-card or custom:better-thermostat-mini-climate-card in YAML).


Key Features (v2.0)

  • True room-center regulation: Drives TRVs via Direct Valve (0–100 %), Local Offset, or Target Temperature calibration, plus automatic external room-temperature mirroring on supported models (such as Sonoff TRVZB & TRV-ZBT, Aqara SRTS-A01, Danfoss Ally 014G2461, and Shelly BLU TRV).
  • Multi-TRV grouping & optional AC cooling: Synchronizes multiple radiators in one room (even mixed brands) and optionally coordinates an air conditioner without heating/cooling fights.
  • Window & separate Door pause: Independent open/close debounce delays; offline contact sensors count as closed so dead coin-cell batteries never freeze a room.
  • 24-hour damped Summer Mode: Smooths outdoor sensors or weather forecasts over 24 hours with a 1.0 °C (1.8 °F) hysteresis band so sunny sensor spikes or cool spring mornings don't flip heating erratically.
  • Selectable Presets with live sliders: Enable Eco, Comfort, Sleep, Away, Home, Activity, or Boost—each backed by persistent number entities (Min/Max pairs when a cooler is configured).
  • Pause Learning & Device Release switches: Freeze model adaptation while a fireplace burns or a boiler heats tap water, or hand TRVs back to manual control with one toggle.
  • 9 ready-made Automation Blueprints: Including a 4-slot Weekly Heating Schedule, Night Mode, Presence Away, Pause Learning, and battery/humidity alerts.
  • Fail-soft & observable: Steps down gracefully (optimal → sensor_fallback → hold) if sensors drop offline, spaces radio writes (30 s default / 10 min HomematicIP) to protect batteries, and includes a 50-cycle deterministic flight recorder in Home Assistant Diagnostics.

Control Algorithms (Calibration mode)

Better Thermostat offers 8 control algorithms—see Calibration types & algorithms for concrete numerical examples:

  • AI Time Based: Uses a custom algorithm based on simple measurements and calculations (not actual AI) to calculate the required heating power and adjusts the TRV calibration to achieve it. This improves upon the standard TRV internal algorithm. It is the default.
  • TPI (Time Proportional Integral): Turns the distance from the target into a duty cycle and holds the valve at that opening, which keeps the temperature stable and reduces overshoot.
  • MPC v2 (experimental): A predictive controller with a Kalman observer and a quadratic-program optimiser. It writes the valve directly with Direct Valve Based and otherwise works through the target temperature or the offset.
  • PID Controller: A classic Proportional-Integral-Derivative controller that learns your room's characteristics to maintain a stable temperature. It features auto-tuning (currently in beta) to automatically find the best parameters (Kp, Ki, Kd) for your room.
  • Aggressive: Pushes the TRV harder while heating for a faster warm-up, at the price of more overshoot.
  • External Sensor Offset Only: Corrects the TRV's internal sensor with your room sensor and nothing more.
  • MPC (Model Predictive Control): Uses a physical model of your room and radiator to predict future temperature changes and optimize valve opening.
  • No Calibration: Passes your target temperature to the TRV unchanged.

Start with AI Time Based (the default) or TPI. Try PID for tighter tracking in a stable room, or MPC for disturbance anticipation. The algorithm documentation describes every mode, or use the Interactive Configurator to get a tailored room setup.


Supported Hardware & Integrations

Any thermostat exposed as a Home Assistant climate entity with a writable target temperature works out of the box. Tested integrations include:

  • Zigbee2MQTT (recommended for Zigbee TRVs — unlocks local offsets and direct valve position)
  • ZHA (Zigbee Home Automation) & deCONZ
  • Shelly (including dedicated direct-valve support for Shelly BLU TRV via BLU Gateway)
  • Homematic(IP) Local / OpenCCU (supports select temperature offsets + 10-minute radio duty-cycle protection)
  • Z-Wave JS (including Eurotronic Spirit Z / Aeotec ZWA021 direct-valve mode and parameter 8 local offsets)
  • tado° & generic_thermostat

Built-in quirk fixes are included for 15+ popular models (TRVZB, TRV-ZBT, SRTS-A01, 014G2461, SPZB0001, ZWA021, COZB0001, SHTRV-01, SEA801/802, BTH-RM, ME167, TS0601, TV02-Zigbee, BHT-002-GCLZB, TermoWeb Heater, and more)—see Supported devices & compatibility.


Quick Setup

  1. Install Better Thermostat via HACS (or copy custom_components/better_thermostat from the latest release) and restart Home Assistant.
  2. If a room has multiple window or door contacts, combine them first under Settings → Devices & Services → Helpers → + Create Helper → Group → Binary sensor group.
  3. Go to Settings → Devices & Services → + Add Integration → Better Thermostat and follow the 5-minute quickstart.
  4. Upgrading from version 1.9? Read Upgrading from 1.9 to 2.0.

Contributing

See CONTRIBUTING.md.

☕ Support

If you want to support this project, you can ☕ buy a coffee here.

Buy me a coffee