Automate thermostat temperature based on another thermostat

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 }}"
"{{ state_attr('current_temperature', 'temperature') }}"

Replace current_temperature with the entity ID of the primary thermostat

1 Like

Thank you. That did it. I knew I was close but could not find the missing piece. You are amazing.

1 Like