Synching two radiators to one thermostat

I have managed to get the automation to trigger on thermostat change, but the execution fails with this error:
“Error rendering data template: UndefinedError: ‘climate’ is undefined”
It relates to the temperature line in automations.yaml:

- id: '1639835751356'
  alias: Termostatändring köket
  description: ''
  trigger:
  - platform: state
    entity_id: climate.popp_termostat_17_vanster_2
    attribute: temperature
  condition: []
  action:
  - service: climate.set_temperature
    target:
      entity_id: climate.popp_termostat_16_hoger
    data:
      temperature: "{{ float(climate.popp_termostat_17_vanster_2) + 1 }}"
  mode: queued
  max: 10

The objective is to set thermostat 16 to the value of thermostat 17 +1 deg C.
Can you help?

Thanks,
Fumble

Your current template was trying to write to the state of the climate object which is not a float. However, the states portion of the template wasn’t there. The state attribute flag is required. The following should get you there.

    data:
      temperature: "{{ float(state_attr('climate.popp_termostat_17_vanster_2','temperature')) + 1 }}"

It sure did - thank you so much!
=)