Skip to content

Better Thermostat - Intelligent Heating Control

Medium 30 min

Better Thermostat is a HACS integration that makes your “dumb” radiator thermostats smart. It uses an external temperature sensor, window sensors and weather data to optimize heating and save energy.

Better Thermostat overview

Radiator thermostats (TRVs) measure the temperature right at the radiator - typically 2-5°C warmer than the rest of the room. Better Thermostat solves this:

ProblemBetter Thermostat solution
Wrong temperatureUses an external sensor for the real room temperature
Open window = wasteStops heating automatically when a window opens
Manual adjustmentPresets: Eco, Comfort, Away, Boost
Multiple radiatorsGroup TRVs in the same room
CalibrationAutomatic offset calibration

Hardware (you probably already own some of it)

Section titled “Hardware (you probably already own some of it)”
ComponentExamplesRequired?
Radiator thermostat (TRV)Shelly TRV, TRÅDFRI, Sonoff TRVZB, Aqara✅ Yes
Temperature sensorShelly Wall Display, Aqara, IKEA Vindstyrka✅ Recommended
Window sensorAqara, Sonoff, Shelly⭐ Optional
Home AssistantWith HACS installed✅ Yes

The guide assumes a setup many people already have:

  • Shelly TRV radiator thermostats in the living room
  • Shelly Wall Display or another device with a temperature sensor
  • Several temperature sensors around the house
  1. Open HACS in Home Assistant
  2. Click Integrations
  3. Search for Better Thermostat
  4. Click Download and restart Home Assistant
  1. Go to SettingsDevices & services
  2. Click Add integration
  3. Search for Better Thermostat
  4. Follow the setup wizard

When creating the thermostat you specify:

FieldDescriptionExample
NameName of the thermostat”Living Room Better”
ThermostatYour existing TRVclimate.shelly_trv_living_room
Temperature SensorExternal room temperature sensorsensor.shelly_wall_display_temperature
Window SensorWindow sensor (optional)binary_sensor.window_living_room

After creation you can adjust these under SettingsDevices & servicesBetter ThermostatConfigure:

SettingInternal keyFunction
Outdoor Sensoroutdoor_sensorOutdoor temperature, e.g. sensor.openweathermap_temperature
Off Temperatureoff_temperatureOutdoor temperature at which heating switches off entirely
Window Delaywindow_off_delaySeconds before reacting to an open window (e.g. 30)
Window Delay Afterwindow_off_delay_afterSeconds before heating resumes after the window closes
TolerancetoleranceAllowed deviation before the thermostat regulates
PresetspresetsChoose which presets (eco, comfort, away, etc.) are active

📊 Example: Living Room with 2 Radiators

Section titled “📊 Example: Living Room with 2 Radiators”

Here is a complete example with a living room that has 2 Shelly TRVs:

Step 1: Create a Better Thermostat for the room

Section titled “Step 1: Create a Better Thermostat for the room”
  1. Add integration → Better Thermostat
  2. Name: “Living Room Heating”
  3. Thermostat: Select both TRVs (grouping)
    • climate.shelly_trv_living_room_1
    • climate.shelly_trv_living_room_2
  4. Temperature Sensor: sensor.shelly_wall_display_temperature
  5. Window Sensor: binary_sensor.window_living_room (if you have one)

After creation you get:

# New climate entity
climate.living_room_heating:
current_temperature: 21.5°C # From the Wall Display
target_temperature: 21°C
preset_mode: comfort
# Attributes
hvac_action: heating
window_open: false
PresetDefault tempUse case
None20°CDefault
Eco19°CEnergy saving
Comfort21°CAt home and active
Boost24°CQuick heat-up
Away16°CNot home
Sleep18°CNight
# Via automation or service call
service: climate.set_temperature
target:
entity_id: climate.living_room_heating
data:
temperature: 22
automation:
- alias: "Heating: Away when nobody home"
trigger:
- platform: state
entity_id: group.people_home
to: "not_home"
for:
minutes: 30
action:
- service: climate.set_preset_mode
target:
entity_id:
- climate.living_room_heating
- climate.bedroom_heating
- climate.office_heating
data:
preset_mode: away
- alias: "Heating: Comfort when home"
trigger:
- platform: state
entity_id: group.people_home
to: "home"
action:
- service: climate.set_preset_mode
target:
entity_id:
- climate.living_room_heating
- climate.bedroom_heating
data:
preset_mode: comfort
automation:
- alias: "Heating: Sleep at night"
trigger:
- platform: time
at: "22:30:00"
action:
- service: climate.set_preset_mode
target:
entity_id:
- climate.living_room_heating
- climate.bedroom_heating
data:
preset_mode: sleep
- alias: "Heating: Comfort in the morning"
trigger:
- platform: time
at: "06:30:00"
condition:
- condition: state
entity_id: group.people_home
state: "home"
action:
- service: climate.set_preset_mode
target:
entity_id:
- climate.living_room_heating
- climate.bedroom_heating
data:
preset_mode: comfort
automation:
- alias: "Office: Boost on presence"
trigger:
- platform: state
entity_id: binary_sensor.office_presence
to: "on"
condition:
- condition: numeric_state
entity_id: sensor.office_temperature
below: 20
action:
- service: climate.set_preset_mode
target:
entity_id: climate.office_heating
data:
preset_mode: boost
# Switch to comfort after 30 min
- delay:
minutes: 30
- service: climate.set_preset_mode
target:
entity_id: climate.office_heating
data:
preset_mode: comfort

Better Thermostat can automatically stop heating when a window opens:

# Configured at creation or via Options
window_sensors: binary_sensor.window_living_room
window_off_delay: 30 # Wait 30 sec before stopping the heat
window_off_delay_after: 0 # Resume heating immediately when the window closes

Better Thermostat has no built-in temperature-drop detection. If you lack a physical sensor, you can instead create a virtual window sensor that switches to “on” after a sudden temperature drop:

  1. Install the community blueprint Window open detection by temperature
  2. Create an automation from the blueprint using your room temperature sensor and an input_boolean as the “window”
  3. Select the input_boolean/binary_sensor as Window Sensor in Better Thermostat

Install the matching UI card to see extra info:

  1. Open HACSFrontend
  2. Search for Better Thermostat UI Card
  3. Install and reload your browser
# Lovelace card configuration
type: custom:better-thermostat-ui-card
entity: climate.living_room_heating
eco_temperature: 19
disable_window: false
disable_summer: false
type: thermostat
entity: climate.living_room_heating
features:
- type: climate-preset-modes
preset_modes:
- eco
- comfort
- boost
- away
- sleep

Better Thermostat automatically calibrates your TRV based on the difference between the TRV’s built-in sensor and your external sensor.

  1. The TRV measures 24°C (at the radiator)
  2. The external sensor measures 21°C (in the room)
  3. Better Thermostat calculates the offset: -3°C
  4. Sends the calibration to the TRV

Combine with the Energy dashboard:

# Add to configuration.yaml
template:
- sensor:
- name: "Living Room Heating Status"
state: >
{% if is_state_attr('climate.living_room_heating', 'hvac_action', 'heating') %}
Heating
{% else %}
Idle
{% endif %}
# history_stats measures how long the status sensor has been "Heating" today
sensor:
- platform: history_stats
name: "Daily Heating Time Living Room"
entity_id: sensor.living_room_heating_status
state: "Heating"
type: time # Result in hours
start: "{{ today_at() }}"
end: "{{ now() }}"
climate.living_room_heating → Shelly TRV x2 + Wall Display temp
climate.bedroom_heating → Shelly TRV + Aqara temp sensor
climate.office_heating → Shelly TRV + LD2410 temp (ESP32)
climate.bathroom_heating → Shelly TRV + Wall Display temp
# groups.yaml
heating_all_rooms:
name: "All rooms heating"
entities:
- climate.living_room_heating
- climate.bedroom_heating
- climate.office_heating
- climate.bathroom_heating

Comments