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

Last synced: about 23 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.

README.md

Active installations
GitHub issues
Version - 1.7.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.3.0)

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 (each preset, incl. baseline/"no preset", remembers the last temperature you set and survives restarts)

Dynamic Preset Temperature Persistence

Since version (next release) static preset temperature fields have been removed from the configuration flow. Preset temperatures are now fully dynamic and automatically persisted.

How it works:

  1. Select a preset (e.g. Boost, Eco, Comfort, Sleep, Activity, Home, Away) or stay in "No preset".
  2. Change the target temperature in the standard UI while that preset is active.
  3. The new value is immediately stored as that preset's temperature (or as the baseline temperature when in "No preset").
  4. Switching away and back to the preset re-applies your custom value.
  5. All customized preset (and baseline) temperatures are persisted across Home Assistant restarts (using a combination of entity state restore and config entry options for durability even in ephemeral test containers).

What is stored:

  • Every preset listed in the climate entity plus the baseline (shown as no active preset) maintains its own temperature.
  • A flag bt_preset_customized (boolean) indicates if at least one preset deviates from the original defaults.
  • The mapping itself is exposed in the entity attributes as bt_preset_temperatures (JSON serialized) and is also mirrored into the integration's config entry options.

Resetting presets:

  • To revert a single preset: activate it and set the temperature back to the original default (see defaults below). That becomes the new stored value.
  • To revert everything quickly you can remove and re-add the integration (this clears stored options) or manually delete the bt_preset_temperatures key from the config entry options (advanced users via .storage editing—only do this while HA is stopped).

Default starting values (if no customization yet):

None (baseline): 20.0 °C
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

FAQ:

  • Q: Are values lost if I restore a backup?
    A: They are stored in the config entry options and in the last entity state, so a normal HA backup/restore keeps them.
  • Q: Can I automate per-preset changes?
    A: Yes—call climate.set_temperature while the preset is active; the stored preset temperature updates automatically.

If you rely on automation logic that previously referenced static config values, update it to read the entity attribute bt_preset_temperatures instead.

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


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 months ago

Total Commits: 857
Total Committers: 63
Avg Commits per committer: 13.603
Development Distribution Score (DDS): 0.544

Commits in past year: 60
Committers in past year: 14
Avg Commits per committer in past year: 4.286
Development Distribution Score (DDS) in past year: 0.75

Name Email Commits
KartoffelToby k****t@t****e 391
@RubenKelevra c****d@g****m 234
Wolfgang Tom m****l@w****e 89
James McMahon j****n@p****t 17
Folfy f****y 15
Dr. Torge Valerius 2****b 8
Tobias Haber t****r@d****g 7
felixhaeberle 3****e 7
Nguyen Thao Dat t****n@s****e 4
Copilot 1****t 4
Jameson_UK 1****k 4
xX7 5****7 3
misa1515 6****5 3
chigelo 1****o 3
Thomas Wendt t****y@g****t 3
Fettlaus 8****s 3
Eric HOUET e****t@d****v 3
Cycor 6****r 3
Hans 1****c 2
Jiří Furda 2****a 2
Krystian Kotkowski 6****o 2
LeoCal 2****l 2
Maximilian Pott m****2@g****m 2
Michael Mior m****r@g****m 2
developer d****t@s****e 2
Nicolas Liaudat n****t 2
Oliver Butler d****v@o****k 2
Pablo C P****s 2
Tomcat86878 7****8 2
Said Tahsin Dane t****c@g****m 1
and 33 more...

Committer domains:


Issue and Pull Request metadata

Last synced: about 2 months ago

Total issues: 478
Total pull requests: 159
Average time to close issues: 4 months
Average time to close pull requests: 19 days
Total issue authors: 356
Total pull request authors: 46
Average comments per issue: 4.18
Average comments per pull request: 1.41
Merged pull request: 115
Bot issues: 0
Bot pull requests: 0

Past year issues: 128
Past year pull requests: 69
Past year average time to close issues: 11 days
Past year average time to close pull requests: 15 days
Past year issue authors: 110
Past year pull request authors: 19
Past year average comments per issue: 2.55
Past year average comments per pull request: 1.59
Past year merged pull request: 37
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/KartoffelToby/better_thermostat

Top Issue Authors

  • RubenKelevra (38)
  • kuduacz (7)
  • pbranly (6)
  • Soukyuu (5)
  • LinuxfarmerHH (5)
  • bsafh (5)
  • code-chicken (5)
  • jamesonuk (4)
  • tomg1970 (3)
  • deveth0 (3)
  • mueller-esch (3)
  • R1DEN (3)
  • DeimicUser (3)
  • MaJerle (3)
  • folfy (3)

Top Pull Request Authors

  • RubenKelevra (26)
  • folfy (17)
  • KartoffelToby (15)
  • wtom (9)
  • albummi (8)
  • cygnusb (8)
  • jamesonuk (8)
  • Copilot (7)
  • Moohan (3)
  • hpuac (3)
  • tjorim (2)
  • apo-mak (2)
  • tasomaniac (2)
  • iainlane (2)
  • imbaczek (2)

Top Issue Labels

  • new bug (260)
  • feature (118)
  • bug (50)
  • wait for feedback (29)
  • stale (22)
  • under investigation (14)
  • enhancement (13)
  • help wanted (6)
  • faq (6)
  • documentation (4)
  • duplicate (3)
  • special device (3)
  • new function (3)
  • question (2)
  • wontfix (2)
  • chores (1)
  • new integration (1)

Top Pull Request Labels

  • enhancement (13)
  • bug (8)
  • documentation (8)
  • chores (3)
  • feature (2)

Package metadata

proxy.golang.org: github.com/KartoffelToby/better_thermostat

proxy.golang.org: github.com/kartoffeltoby/better_thermostat


Dependencies

.github/workflows/black.yml actions
  • actions/checkout v2 composite
  • psf/black stable composite
.github/workflows/hassfest.yaml actions
  • actions/checkout v2 composite
  • home-assistant/actions/hassfest master composite
.github/workflows/pages.yml actions
  • actions/checkout v3 composite
  • actions/configure-pages v2 composite
  • actions/deploy-pages v1 composite
  • actions/jekyll-build-pages v1 composite
  • actions/upload-pages-artifact v1 composite
.github/workflows/validate.yaml actions
  • actions/checkout v2 composite
  • hacs/action main composite
requirements.dev.txt pypi
  • black ==23.9.1 development
  • codespell ==2.2.2 development
  • flake8 ==4.0.1 development
  • homeassistant ==2023.9.2 development
  • pre-commit ==2.15.0 development
  • ruff ==0.0.289 development
  • yamllint ==1.32.0 development

Score: -Infinity