- Python 98.5%
- TypeScript 1.1%
- Astro 0.2%
| .devcontainer | ||
| .github | ||
| .vscode | ||
| assets | ||
| blueprints | ||
| custom_components | ||
| docs | ||
| scripts | ||
| tests | ||
| website | ||
| .blind-except-budget.json | ||
| .coderabbit.yaml | ||
| .coverage-floors.json | ||
| .editorconfig | ||
| .forward-port-gaps.json | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .python-version | ||
| .restated-contract-budget.json | ||
| .yamllint | ||
| AGENTS.md | ||
| CONTRIBUTING.md | ||
| glossary.toml | ||
| hacs.json | ||
| LICENSE | ||
| project.inlang.json | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Better Thermostat
Full documentation & Interactive Configurator: https://better-thermostat.org/
What is Better Thermostat?
- Fixes the physical radiator sensor flaw: Every smart radiator thermostat (TRV) measures temperature millimeters away from its own
55–70 °Chot water pipe, causing it to read several degrees too warm and shut off while your room is still cold. - 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)
- 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).
- Questions or setup help: GitHub Discussions
- Bug reports or feature/quirk requests: GitHub Issues
- Contributing & developer internals: CONTRIBUTING.md and Internals documentation
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 SonoffTRVZB&TRV-ZBT, AqaraSRTS-A01, Danfoss Ally014G2461, andShelly 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, orBoost—each backed by persistentnumberentities (Min/Maxpairs 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
selecttemperature offsets + 10-minute radio duty-cycle protection) - Z-Wave JS (including Eurotronic Spirit Z / Aeotec
ZWA021direct-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
- Install Better Thermostat via HACS (or copy
custom_components/better_thermostatfrom the latest release) and restart Home Assistant. - If a room has multiple window or door contacts, combine them first under Settings → Devices & Services → Helpers → + Create Helper → Group → Binary sensor group.
- Go to Settings → Devices & Services → + Add Integration → Better Thermostat and follow the 5-minute quickstart.
- 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.