Set the target thermostat temperature with another thermostat

Please I need to set the target temperature of thermostat_1 with another thermostat_2.
I created an automation attempt that doesn’t work for me.
Can anyone help me find a bug and make automation work?
Thank you

  alias: termo do termo
  trigger:
  - platform: state
    entity_id: climate.koupelna
    attribute: temperature
  action:
  - service: climate.set_temperature
    entity_id: climate.kuchyn
    data_template:
      temperature: "{{state_attr ('climate.koupelna', 'temperature') }}"

edit: solved

1 Like