Skip to content

Instantly share code, notes, and snippets.

@mairas
Created November 20, 2023 21:11
Show Gist options
  • Save mairas/97e0e7ac634ed024efcb80876b4a62fa to your computer and use it in GitHub Desktop.
Save mairas/97e0e7ac634ed024efcb80876b4a62fa to your computer and use it in GitHub Desktop.
HA Smart Thermostat setup for multiple TRVs
climate:
- platform: smart_thermostat
name: Olohuone Smart Thermostat
unique_id: olohuone_smart_thermostat
# target input_number has been created manually in Settings -> Devices & services -> Helpers
heater: input_number.olohuone_smart_thermostat_valve_state
target_sensor: sensor.olohuone_pvvx_temperature
min_temp: 10
max_temp: 24
ac_mode: False
keep_alive:
seconds: 240
sampling_period:
seconds: 300
# NB: changing these after the initial setup won't have any effect!
# Adjust the values using the smart_thermostat.set_pid_gain service.
kp: 30
ki: 0.041666666666666664
kd: 0
ke: 0
pwm: 0
debug: true
alias: Update Olohuone Valve State
description: ""
trigger:
- platform: state
entity_id:
- input_number.olohuone_smart_thermostat_valve_state
condition: []
action:
- service: number.set_value
data:
value: >-
{{
(states('input_number.olohuone_smart_thermostat_valve_state')|float/100*99)|round}}
target:
entity_id:
- number.olohuone_e_trv_valve_control
- number.olohuone_s_radiator_thermostat_valve_control
- number.ruokailutila_s_radiator_thermostat_valve_control
- number.ruokailutila_w_radiator_thermostat_valve_control
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment