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 99.2%
  • SCSS 0.6%
  • Shell 0.2%
Find a file
Wolfgang Tom c14e51c10b
mpc loss (#1877)
* mpc loss learning in steady state

* lint

* new sensors

* persist stats

* 1h EMA sensor

* bugfix

* bugfix

* ema 1h precision

* mpc regime change and heat boost
2026-01-23 20:10:11 +01:00
.devcontainer chore: migrate from black/flake8/pyupgrade to ruff (#1801) 2026-01-07 18:13:31 +01:00
.github Bump python version 2026-01-07 21:34:27 +01:00
.vscode chore: migrate from black/flake8/pyupgrade to ruff (#1801) 2026-01-07 18:13:31 +01:00
_sass/color_schemes change domain 2022-09-23 18:22:46 +02:00
assets [TASK] update doc 2023-01-10 18:28:49 +01:00
blueprints [TASK] fixing 2022-10-07 21:48:11 +02:00
custom_components mpc loss (#1877) 2026-01-23 20:10:11 +01:00
docs Remove front matter from algorithms.md 2026-01-02 16:38:15 +01:00
scripts Fix/heating power valve pos (#1581) 2025-03-16 12:50:01 +01:00
tests Add off_temperature attribute to climate entity with test coverage (#1843) 2026-01-12 11:43:15 +01:00
tmp [TASK] fix lint 2026-01-07 21:16:34 +01:00
.editorconfig black: change editorconfig from tab to spaces 2022-05-05 17:19:31 +02:00
.gitignore Add configurable preset temperatures for comprehensive scheduler-card integration (#1639) 2025-10-09 13:17:52 +02:00
.pre-commit-config.yaml chore: migrate from black/flake8/pyupgrade to ruff (#1801) 2026-01-07 18:13:31 +01:00
_config.yml [FIX] theme 2022-09-23 18:24:21 +02:00
about.info [about.info] small rewording 2022-01-21 23:14:14 +01:00
CONTRIBUTING.md Update CONTRIBUTING.md 2024-11-22 09:58:42 +00:00
hacs.json [TASK] implement eco mode and fix some main code (#1721) 2025-11-25 20:33:04 +01:00
index.md [TASK] fix avg outdoor temp sensor 2022-09-22 18:14:47 +02: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 Turkish translation support (#1743) 2025-12-16 22:16:43 +01:00
pyproject.toml [TASK] reimplement default mode, fix specific TRV Valve entities 2026-01-08 20:18:55 +01:00
README.md config_flow bugfixes, sensors and input numbers for PID, eco temperature removed 2026-01-02 12:39:43 +01:00
requirements.dev.txt REVERT to last stable HA 2026-01-07 21:31:49 +01:00

Active installations GitHub issues Version - 1.8.0 Discord hacs_badge

Better Thermostat

For more info visit: https://better-thermostat.org/

Requirements

  • Minimum required Home Assistant version: 2024.12 (Latest tested version: 2025.11.3)

Companion UI

We've created a companion UI element which can display more information than the default thermostat element in Home Assistant. Check it out via HACS: better-thermostat-ui-card

  • If you have a question or need help please create a new discussion or check if your question is already answered
  • If you have a suggestion, found a bug, or want to add a new device or function create a new issue
  • If you want to contribute to this project create a new pull request

Features

This integration brings some smartness to your connected radiator thermostats setup:

  • Uses a temperature sensor far away from the radiators to measure the real room temperature
  • Makes your TRVs fully compatible with Google Home
  • Let your windows disable your heating (avoid programming this via an automation)
  • Your weather forecast provider will turn your heat on/off
  • Or an outside air temperature sensor can do this as well
  • Does some valve maintenance automatically, to avoid them getting stuck closed over the summer
  • Group multiple TRVs to one (e.g. for a room with multiple radiators)
  • Enhance the default TRV Algorithm with some smartness to reduce energy consumption
  • Dynamic preset temperature learning & persistence (baseline/"no preset" remembers the last temperature you set and survives restarts)
  • Advanced Control Algorithms: Choose between MPC, PID, TPI, AI Time Based or simple target temperature matching for precise control.
  • Selectable Presets: Configure which preset modes are available for your thermostat during setup.

Advanced Control Algorithms

Better Thermostat now supports multiple advanced control strategies to optimize your heating:

  • MPC (Model Predictive Control): Uses a physical model of your room and radiator to predict future temperature changes and optimize valve opening.
  • 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.
  • TPI (Time Proportional Integral): A control method that cycles the valve on and off (or modulates it) to maintain a stable temperature, reducing overshoot.
  • 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.

These modes can be selected in the advanced configuration of the device.

Preset Temperature Configuration

Preset temperatures are now fully configurable via dedicated number entities.

How it works:

  1. During setup or configuration, you can select which Presets you want to enable for this thermostat.
  2. For each enabled preset mode (e.g. Eco, Comfort, Sleep), a corresponding number entity is created (e.g., number.better_thermostat_preset_eco).
  3. These entities are located in the Configuration category of the device.
  4. You can adjust the temperature for each preset directly using these number sliders.
  5. The values are automatically persisted across Home Assistant restarts.
  6. Changing a preset temperature via the number entity immediately updates the thermostat if that preset is currently active.

Default starting values:

Away:            16.0 °C
Boost:           24.0 °C
Comfort:         21.0 °C
Eco:             19.0 °C
Home:            20.0 °C
Sleep:           18.0 °C
Activity:        22.0 °C

Which hardware do we support?

We support all thermostats which are compatible with Home Assistant as long as they are shown up as a climate entity

Integrations that are tested

  • Zigbee2Mqtt
  • Deconz
  • Tado
  • generic_thermostat

How to setup

Install this integration via HACS or copy the files from the latest release

Configuration details can be found in the documentation or on our website: better-thermostat.org

Some nice-to-know config tips for the configuration.yaml

Example Window/Door - Sensor config

group:
  livingroom_windows:
    name: Livingroom Windows
    icon: mdi:window-open-variant
    all: false
    entities:
      - binary_sensor.openclose_1
      - binary_sensor.openclose_2
      - binary_sensor.openclose_3

Combine multiple TRV to one (Group)

No worry, Better Thermostat supports grouping out of the box


Contributing?

checkout the CONTRIBUTING.md file

Support

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