# Better Thermostat for Home Assistant: Setup and TRV Control

> Better Thermostat is a Home Assistant custom integration for controlling compatible TRVs through room sensors, window and door states, forecasts, and selectable control algorithms. It suits users who want more climate logic without building separate automations, but it adds configuration choices and tuning requirements.

**KartoffelToby/better_thermostat** — 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.

- Repository: https://github.com/KartoffelToby/better_thermostat
- Website: https://better-thermostat.org
- Stars: 1,523 · Forks: 186
- Language: Python
- License: AGPL-3.0
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/kartoffeltoby-better-thermostat

## What Better Thermostat Changes in a Home Assistant Heating Setup

Better Thermostat addresses a specific gap in basic thermostatic radiator valve control. A TRV commonly measures temperature near the radiator, while the occupied part of a room can be warmer or colder. The integration can use a temperature sensor placed away from the radiator to make room-level heating decisions. That is useful for Home Assistant users whose radiators produce inconsistent local readings or whose comfort depends on a more representative sensor.

It also removes the need to assemble several separate automations for common heating conditions. According to the README, window and door sensors can disable heating, a weather forecast provider can turn heating on or off, and an outside air temperature sensor can provide another decision input. The integration also performs valve maintenance automatically so valves are less likely to remain closed for long periods during summer.

The target audience is an existing Home Assistant installation with connected TRVs exposed as climate entities. Better Thermostat says it supports any thermostat compatible with Home Assistant when that thermostat is represented by a climate entity. Zigbee2Mqtt, Deconz, Tado, and generic_thermostat are listed as tested integrations, but the stated compatibility boundary is broader than that list.

This is not a physical thermostat replacement. It adds a Home Assistant integration around compatible entities. The underlying radio, gateway, firmware, climate entity, temperature sensor, and Home Assistant installation still form part of the system. If any of those pieces is unreliable, Better Thermostat cannot create a reliable heating decision.

## Sensor Inputs, Valve Decisions, and Calibration Logic

The documented control flow begins with room and environmental context. Better Thermostat can take a room-temperature measurement from a sensor away from the radiator, consult window or door sensors, use a forecast provider, or use outside air temperature. It can also group multiple TRVs under one logical thermostat, which fits a room containing more than one radiator rather than forcing separate decisions for each valve.

On the output side, the integration issues climate requests to supported TRVs. Its README also describes automatic calibration intended to compensate for imprecise measurements taken near a radiator. That matters because a valve that performs well against its own local reading may not produce the expected room result. Calibration is part of the integration's adaptation layer, rather than a feature a user has to reproduce in a separate automation.

Control behavior is selectable. The documented strategies are TPI, PID, MPC, AI Time Based, and simple target temperature matching. TPI cycles or modulates the valve and is described as the broadest default. PID is intended for tighter tracking in a stable room, although its auto-tuning is still in beta. MPC predicts temperature changes from a room and radiator model, then optimizes valve opening. AI Time Based uses measurements and calculations, but the project explicitly says it is not actual AI.

The data boundary is important. The README does not disclose the exact event sequence, prediction horizon, calibration interval, or persistence format. It does establish the inputs and intended outputs, but engineers deciding whether to deploy it should not treat the algorithm descriptions as a complete control specification.

## Installing the Custom Integration Through HACS

The README gives two acquisition routes: install through HACS, or copy the files from the latest release. It does not publish a shell command for installation, and the repository declares itself as a Home Assistant custom integration rather than an installable Python package. For that reason, a `pip` or `uv` command would be misleading.

Before proceeding, check the stated requirements. The README requires Home Assistant `2026.7.2` or newer. The repository metadata also specifies Python `>=3.14.2`, although that floor is inherited from the supported Home Assistant line. Users should compare those values with the environment that runs Home Assistant rather than manually installing Python components into it.

A sensible first-use sequence begins with adding Better Thermostat through HACS. If that route is unsuitable, download the latest release and copy its files into the Home Assistant custom integration directory according to the procedure in the linked documentation. The README does not specify the destination path or restart procedure, so those details must come from the project documentation rather than from an invented command.

After Home Assistant recognizes the integration, configure a thermostat exposed as a climate entity. The setup process can select presets and expose advanced control modes. The README does not give a complete UI walkthrough, including the exact menu labels, so the project configuration page at `better-thermostat.org/configuration` is the appropriate source for that step.

The following is the exact window-sensor group example included in the README. It belongs to the configuration stage, not to the installation command sequence. After adding the group in Home Assistant, select it as the relevant input while configuring Better Thermostat.

```yaml
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
```

A first useful configuration should begin with a room sensor and one TRV before adding forecasts, multiple valves, or complicated algorithms. This gives the user a smaller control path to inspect. The README suggests starting with TPI or AI Time Based, then trying PID or MPC where tighter tracking or disturbance anticipation is worth additional tuning.

## Configuring Window Groups and Room Climate Entities

Window and door handling can be represented as a Home Assistant group. The README provides this exact example for three binary sensors. It does not define `all: false` in the excerpt, so teams should consult Home Assistant and the Better Thermostat configuration documentation before assuming whether a match or no-match state should suspend heating.

The grouped entities can then be selected as window or door input during Better Thermostat configuration according to the linked configuration guide. The snippet configures a Home Assistant group. It does not, by itself, create the integration or assign the group to a thermostat.

The same restraint applies to multiple TRVs. Better Thermostat documents grouping multiple TRVs into one logical control unit, but the README does not provide a complete YAML example for that feature. The practical first use is therefore configuration through the documented setup interface, not reconstruction from the short window example.

Preset behavior is more explicit. A user selects preset modes such as Eco, Comfort, or Sleep, and the integration creates corresponding `number` entities in the device's Configuration category. Values persist across Home Assistant restarts. Changing the value of an active preset immediately updates the thermostat. This makes presets editable entities rather than fixed values in the integration.

## MPC, PID, TPI, and Time-Based Control Trade-offs

The algorithm menu is the main engineering decision, and each option carries a different cost in tuning, valve movement, or setpoint accuracy. The README positions TPI as a sensible default because it is intended to work across different room types, remain gentle on the valve and battery, and accommodate multiple radiators. Its documented weakness is looser setpoint tracking than PID or MPC.

PID offers a tighter response in a stable, well-characterized room. That makes it less compelling for rooms whose temperature changes are difficult to model. The controller has more valve activity, its results vary by room, and auto-tuning remains in beta. A user who enables PID should therefore treat auto-tuning as an incomplete feature rather than a guarantee that room parameters will be discovered correctly.

MPC is the most demanding option in the documented comparison. It is intended to anticipate known disturbances such as solar gain, but it requires a usable room and radiator model. The README says it can generate the most valve activity and may over-react when several radiators are involved. Its value depends on model quality, so selecting MPC does not remove the need to understand the physical room.

AI Time Based requires no manual tuning and offers a quick setup. The tradeoff is looser comfort and weaker behavior in complex rooms. Despite its name, it is based on measurements and calculations rather than machine learning. Simple target temperature matching remains available when advanced prediction is unnecessary. There is no documented universal best mode, because the project presents these as different operational choices rather than interchangeable names for one controller.

## Compatibility Limits, Maintenance, and AGPL-3.0

The clearest deployment limits come from Home Assistant, Python, and climate-entity compatibility. Better Thermostat requires Home Assistant `2026.7.2` or newer and is a custom integration rather than a standalone package. A TRV that does not appear as a climate entity falls outside the project's stated support boundary, even if the radio integration can read its internal measurements.

The README lists Zigbee2Mqtt, Deconz, Tado, and generic_thermostat as tested. It does not claim that every model behind those integrations is tested. It also does not provide a compatibility matrix for individual TRVs. Users should therefore verify the concrete climate entity and its services in Home Assistant before moving a heating schedule onto the custom integration.

Maintenance status is recent rather than abandoned. The repository is not archived, and its last push was on 2026-10-12. Releases listed around that change include `2.0.0-Beta1` on 2026-10-11, `1.9.3` on 2026-10-06, and `1.9.2` on 2026-08-25. A beta release and algorithm additions can still change behavior, so upgrades should be treated as compatibility events rather than routine text replacements.

The project uses the AGPL-3.0 license. That matters for organizations that modify the integration, distribute it, or operate a modified version as a service. The repository layout includes source, tests, release files, and a website, but the README does not summarize the license obligations. Review the `LICENSE` file and seek appropriate legal review for a particular deployment model; this article does not provide legal advice.

## Conclusion

Home Assistant users with compatible climate entities should first adopt Better Thermostat if they want sensor-driven heating decisions, window awareness, and preset learning without writing several automations. Users who require a single fixed algorithm, minimal tuning, or a simple TRV should keep the standard integration. Before installation, verify that the minimum Home Assistant and Python versions fit the existing system, confirm the TRV appears as a climate entity, and review the AGPL-3.0 implications for any modified or redistributed deployment.

## FAQ

### What Home Assistant version does Better Thermostat require?

The README states that the minimum required Home Assistant version is `2026.7.2`. The repository metadata also specifies Python `>=3.14.2` for the supported Home Assistant environment.

### Does Better Thermostat work with any Home Assistant TRV?

The project supports thermostats compatible with Home Assistant when they appear as a climate entity. Zigbee2Mqtt, Deconz, Tado, and generic_thermostat are specifically listed as tested integrations.

### Which Better Thermostat control algorithm should I choose first?

The README suggests starting with TPI or AI Time Based. TPI is intended to be gentle on valves and batteries, while AI Time Based requires no tuning but can provide looser comfort and weaker results in complex rooms.

### How does Better Thermostat handle windows and multiple radiators?

Window and door sensors can disable heating, and multiple TRVs can be grouped into one logical thermostat. The README supplies a Home Assistant group example for window sensors but does not provide a complete group configuration for multiple TRVs.

### Can Better Thermostat presets be changed after setup?

Yes. Each enabled preset has a corresponding `number` entity in the device's Configuration category. Values persist across Home Assistant restarts, and changing the active preset value immediately updates the thermostat.

## Sources

- [KartoffelToby/better_thermostat on GitHub](https://github.com/KartoffelToby/better_thermostat)
- [License: AGPL-3.0](https://github.com/KartoffelToby/better_thermostat/blob/master/LICENSE)
- [Project website](https://better-thermostat.org)
- [README](https://github.com/KartoffelToby/better_thermostat/blob/master/README.md)
- [Releases](https://github.com/KartoffelToby/better_thermostat/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/kartoffeltoby-better-thermostat
