Automate thermostat temperature based on another thermostat

So I have four Z-wave based thermostat heads configured and I would like to save me the hassle of adjusting all four of them whenever I want to change the temperature.

Ideally then, I would like to set one of them as the “master” and expose that through the HA web interface. Whenever I adjust the temperature for it I would like for the other thermostat heads to adjust to the same temperature.

Any idea how I can accomplish this? Can I configure an automation to do so? If nothing else, I could just have a timer based automation that checks what the master thermostat value is and set the others accordingly.

Thanks all

Create a template sensor referencing the temperature attribute of the main thermostat. Then use that sensor in an automation as a state trigger:

trigger:
- platform: state
  entity_id: sensor.tstat_setpoint

(This assumes the name of the template sensor is sensor.tstat_setpoint. Change the sensor entity ID as appropriate.)

As the action for that automation, use a data_template with the climate.set_temperature service changing the temperature of the other thermostats to the template sensor temp:

action:
- service: climate.set_temperature
  entity_id:
  - climate.tstat2
  - climate.tstat3
  - climate.tstat4
  data_template:
    temperature: "{{ states('sensor.tstat_setpoint') | float }}"

That automation will trigger upon every state change of the template sensor (whenever you change the main thermostat temp). Make sense?

2 Likes

Thanks a bunch. Will give it a go!

1 Like

The automation triggers but returns an error.

alias: Thermostat Slave Control
  description: Set secondary thermostats to same temperature as the master thermostat.
  trigger:
  - entity_id: sensor.therm_main_temp
    platform: state
  condition: []
  action:
  - alias: ''
    data_template:
      temperature: "{{ states('sensor.therm_main_temp') | float }}"
    entity_id:
      - climate.danfoss_z_thermostat_1
      - climate.danfoss_z_thermostat_3
      - climate.danfoss_z_thermostat_4
    service: climate.set_temperature

Error is as follows:

Error while executing automation automation.thermostat_slave_control. Invalid data for call_service at pos 1: must contain at least one of temperature, target_temp_high, target_temp_low.

Sounds like you have your answer then. Good luck!

Yes. Except for the above mentioned error. Any thoughts?

You need to include target_temp_low or target_temp_high in the data section of that service call.

Makes no sense. The error message clearly states that temperature is also a valid argument.

You’re right. I didn’t even see that.

Oh…are you in heat_cool (auto) mode by any chance? That would be why. That requires high and low, but if you’re in heat or cool mode, only temperature is required. Add another part to the data template setting the desired HVAC mode too.

Hmm… It’s only a simple radiator head. All it can do is set a designated temperature. The “operation” drop-down is empty.

This is a total aside, but what’s with the alias for the action?

It was added automatically by the Web UI.

Well, like @Tediore said, try adding

hvac_mode: heat

To the data_template section

Tried. Same error unfortunately.

Can you post the YAML for your climate entity?

It’s added through the Z-Wave integration. Not even sure where a relevant entity listing would be stored?

Can you go to developer tools > states and post a screenshot of the climate entities including their state attributes?

Nevermind. It works now. I have no idea what was wrong but after a restart it worked just fine. Thanks everyone

I am trying to do the same thing and can’t get it just right. Here is my code. Any help would be greatly appreciated. Here are the line from both the configuration and automations.yaml

sensor:
  - platform: template
    sensors:
      climate_gym_1_sw:
        friendly_name: "Master_Gym"
        unit_of_measurement: 'degrees'
        value_template: "{{ state_attr('current_temperature', 'temperature') }}"


- id: '1593415150466'
  alias: 'Gym thermostats follow #1'
  trigger:
  - entity_id: sensor.climate_gym_1_sw
    platform: state
  condition: []    
  action:
  - service: climate.set_temperature
    entity_id: 
    - climate.gym_2_se
    - climate.gym_3_ne
    - climate.gym_4_nw
    data_template:
      temperature: "{{ states('sensor.climate_gym_1_sw') | float }}"