Better Thermostat
This custom component for Home Assistant will add crucial features to your climate-controlling Thermostatic Radiator Valves to save you the work of creating automations to make it smart.
https://github.com/KartoffelToby/better_thermostat
Category: Consumption
Sub Category: Buildings and Heating
Keywords
climate energy-efficiency hacktoberfest hacs home-assistant home-automation homeassistant moes sea801 sea802 sensor smarthome spzb0001 thermostat ts0601 tuya zigbee zigbee2mqtt
Keywords from Contributors
consumption hue-lights metering power virtual-sensors water varta varta-storage integration hacs-integration
Last synced: about 20 hours ago
JSON representation
Repository metadata
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.
- Host: GitHub
- URL: https://github.com/KartoffelToby/better_thermostat
- Owner: KartoffelToby
- License: agpl-3.0
- Created: 2021-10-30T16:21:04.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2026-11-26T19:14:43.000Z (3 days ago)
- Last Synced: 2026-11-28T18:30:44.462Z (about 20 hours ago)
- Topics: climate, energy-efficiency, hacktoberfest, hacs, home-assistant, home-automation, homeassistant, moes, sea801, sea802, sensor, smarthome, spzb0001, thermostat, ts0601, tuya, zigbee, zigbee2mqtt
- Language: Python
- Homepage: https://better-thermostat.org
- Size: 16.1 MB
- Stars: 1,584
- Watchers: 20
- Forks: 204
- Open Issues: 68
- Releases: 68
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Support: docs/support.md
- Agents: AGENTS.md
README.md
Better Thermostat
For more info visit: https://better-thermostat.org/
Requirements
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.
Not sure which to pick? A quick guide:
| Algorithm | Best For | Trade-off |
|---|---|---|
| TPI | A robust default — steady across room types, gentle on valve & battery, good with multiple radiators | Slightly looser setpoint tracking than PID/MPC |
| PID | Tight setpoint tracking in a stable, well-characterised room | More valve activity; varies more by room; autotune is still in beta |
| MPC | Anticipating solar / known disturbances when the room is modelled well | Most valve activity; can over-react with several radiators; needs tuning |
| AI Time Based | Quick setup, no tuning | Looser comfort, weaker in complex rooms |
Start with TPI or AI Time Based. Try PID for tighter tracking in a stable room, or MPC for disturbance anticipation if you're willing to tune.
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:
- During setup or configuration, you can select which Presets you want to enable for this thermostat.
- For each enabled preset mode (e.g. Eco, Comfort, Sleep), a corresponding
numberentity is created (e.g.,number.better_thermostat_preset_eco). - These entities are located in the Configuration category of the device.
- You can adjust the temperature for each preset directly using these number sliders.
- The values are automatically persisted across Home Assistant restarts.
- 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.
Owner metadata
- Name: Tobias Haber
- Login: KartoffelToby
- Email: kontakt@t-haber.de
- Kind: user
- Description: A Fullstack web application developer from Germany with a passion for open source projects in the smart home industry. Skilled in various programming languages.
- Website: https://t-haber.de
- Location: Germany
- Twitter: Kartoffeltoby
- Company: @dundd
- Icon url: https://avatars.githubusercontent.com/u/8983030?u=c0e47cba24451d547afc534439c4298bd94ab8bb&v=4
- Repositories: 51
- Last ynced at: 2026-11-28T08:58:36.982Z
- Profile URL: https://github.com/KartoffelToby
GitHub Events
Total
- Commit comment event: 1
- Create event: 27
- Delete event: 51
- Discussion event: 20
- Fork event: 37
- Issue comment event: 1402
- Issues event: 572
- Member event: 2
- Pull request event: 160
- Pull request review comment event: 144
- Pull request review event: 156
- Push event: 237
- Release event: 12
- Watch event: 372
Last Year
- Create event: 16
- Delete event: 51
- Discussion event: 17
- Fork event: 11
- Issue comment event: 381
- Issues event: 329
- Pull request event: 98
- Pull request review comment event: 122
- Pull request review event: 124
- Push event: 195
- Release event: 6
- Watch event: 73
Committers metadata
Last synced: 2 days ago
Total Commits: 3,491
Total Committers: 87
Avg Commits per committer: 40.126
Development Distribution Score (DDS): 0.318
Commits in past year: 2,627
Committers in past year: 25
Avg Commits per committer in past year: 105.08
Development Distribution Score (DDS) in past year: 0.094
| Name | Commits | |
|---|---|---|
| Claas Flint | c****t@a****e | 2381 |
| KartoffelToby | k****t@t****e | 495 |
| @RubenKelevra | c****d@g****m | 234 |
| Wolfgang Tom | m****l@w****e | 161 |
| copilot-swe-agent[bot] | 1****t | 19 |
| James McMahon | j****n@p****t | 17 |
| Folfy | f****y | 15 |
| Quenotte | q****e@k****g | 15 |
| Dr. Torge Valerius | 2****b | 8 |
| felixhaeberle | 3****e | 7 |
| Tobias Haber | t****r@d****g | 7 |
| butonche | 1****e | 6 |
| Nguyen Thao Dat | t****n@s****e | 4 |
| George | 1****c | 4 |
| acuiuli | a****i@g****m | 4 |
| misa1515 | 6****5 | 4 |
| Jameson_UK | 1****k | 4 |
| coderabbitai[bot] | 1****] | 3 |
| xX7 | 5****7 | 3 |
| chigelo | 1****o | 3 |
| Thomas Wendt | t****y@g****t | 3 |
| If-Real | 7****7@q****m | 3 |
| Fettlaus | 8****s | 3 |
| Eric HOUET | e****t@d****v | 3 |
| Cycor | 6****r | 3 |
| Aleksander Lawresz | 1****z | 3 |
| infy1995 | i****5@g****m | 3 |
| Tomcat86878 | 7****8 | 2 |
| Said Tahsin Dane | t****c@g****m | 2 |
| Pablo C | P****s | 2 |
| and 57 more... | ||
Committer domains:
- gmx.net: 2
- akator.de: 1
- t-haber.de: 1
- wolfgangtom.de: 1
- phs.scot: 1
- kastortv.org: 1
- division.ag: 1
- student.uni-augsburg.de: 1
- qq.com: 1
- deltacast.tv: 1
- oliverbutler.uk: 1
- gigadefense.com.mx: 1
- schaller-digital.de: 1
- libero.it: 1
- falial.de: 1
- me.com: 1
- generac.com: 1
- jpj.dev: 1
- baraza.io: 1
- patchlevel.de: 1
- orangesquash.org.uk: 1
- schumacher.dev: 1
- wp.pl: 1
Issue and Pull Request metadata
Last synced: 12 days ago
Total issues: 624
Total pull requests: 824
Average time to close issues: 6 months
Average time to close pull requests: 7 days
Total issue authors: 472
Total pull request authors: 75
Average comments per issue: 4.04
Average comments per pull request: 4.49
Merged pull request: 720
Bot issues: 2
Bot pull requests: 1
Past year issues: 140
Past year pull requests: 709
Past year average time to close issues: about 2 months
Past year average time to close pull requests: 1 day
Past year issue authors: 116
Past year pull request authors: 31
Past year average comments per issue: 2.84
Past year average comments per pull request: 4.93
Past year merged pull request: 630
Past year bot issues: 2
Past year bot pull requests: 1
Top Issue Authors
- RubenKelevra (38)
- cl445 (12)
- pbranly (7)
- kuduacz (7)
- code-chicken (5)
- bsafh (5)
- Soukyuu (5)
- LinuxfarmerHH (5)
- jamesonuk (4)
- mueller-esch (3)
- tomg1970 (3)
- DeimicUser (3)
- R1DEN (3)
- folfy (3)
- TheUnlimited64 (3)
Top Pull Request Authors
- cl445 (662)
- RubenKelevra (25)
- KartoffelToby (22)
- folfy (9)
- wtom (8)
- Copilot (7)
- QuenotteKst (5)
- albummi (4)
- jamesonuk (4)
- cygnusb (4)
- cryptomilk (2)
- LeoCal (2)
- hpuac (2)
- acuiuli (2)
- Stev-G (2)
Top Issue Labels
- new bug (324)
- feature (160)
- bug (62)
- wait for feedback (56)
- stale (23)
- under investigation (19)
- enhancement (18)
- new function (13)
- old version (9)
- documentation (7)
- faq (6)
- help wanted (6)
- special device (5)
- duplicate (3)
- question (2)
- wontfix (2)
- new integration (1)
- chores (1)
Top Pull Request Labels
- enhancement (16)
- documentation (8)
- bug (8)
- chores (3)
- feature (2)
- dependencies (1)
- python:uv (1)
Package metadata
- Total packages: 2
- Total downloads: unknown
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 0 (may contain duplicates)
- Total versions: 2
proxy.golang.org: github.com/kartoffeltoby/better_thermostat
- Homepage:
- Documentation: https://pkg.go.dev/github.com/kartoffeltoby/better_thermostat#section-documentation
- Licenses: agpl-3.0
- Latest release: v0.1.0-beta (published about 5 years ago)
- Last Synced: 2026-11-27T18:01:31.896243Z (2 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
proxy.golang.org: github.com/KartoffelToby/better_thermostat
- Homepage:
- Documentation: https://pkg.go.dev/github.com/KartoffelToby/better_thermostat#section-documentation
- Licenses: agpl-3.0
- Latest release: v0.1.0-beta (published about 5 years ago)
- Last Synced: 2026-11-27T18:02:03.988566Z (2 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
Dependencies
- actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 composite
- astral-sh/setup-uv 68559e99cc807c1eb7e9238fd43a15bba460eec2 composite
- actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 composite
- astral-sh/setup-uv 68559e99cc807c1eb7e9238fd43a15bba460eec2 composite
- actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 composite
- actions/configure-pages 45bfe0192ca1faeb007ade9deae92b16b8254a0d composite
- actions/deploy-pages 368f82528645a54fb793d4d04e342629a3f51346 composite
- actions/setup-node 949feb2413d6458794dcd2491c4babbbce0c15c1 composite
- actions/upload-pages-artifact fc324d3547104276b827a68afc52ff2a11cc49c9 composite
- oven-sh/setup-bun 0c5077e51419868618aeaa5fe8019c62421857d6 composite
- actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 composite
- astral-sh/setup-uv 68559e99cc807c1eb7e9238fd43a15bba460eec2 composite
- actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 composite
- actions/setup-node 949feb2413d6458794dcd2491c4babbbce0c15c1 composite
- oven-sh/setup-bun 0c5077e51419868618aeaa5fe8019c62421857d6 composite
- actions/checkout v2 composite
- home-assistant/actions/hassfest master composite
- actions/checkout v2 composite
- hacs/action main composite
- actions/checkout v6 composite
- actions/setup-python v6 composite
- astral-sh/setup-uv v6 composite
- 624 dependencies
- @astrojs/lit ^4.3.0
- @astrojs/starlight ^0.32.6
- astro ^5.17.3
- astro-vtbot ^2.1.11
- gsap ^3.14.2
- lit ^3.3.2
- node-gyp ^12.2.0
- sharp ^0.32.6
- starlight-theme-flexoki ^0.1.0
- 167 dependencies
- actions/checkout de0fac2e4500dabe0009e67214ff5f5447ce83dd composite
- astral-sh/setup-uv fac544c07dec837d0ccb6301d7b5580bf5edae39 composite
Score: -Infinity