Setting temperature via automation

I’m trying to update a bunch of climate entities with the one temperature via automation, but can’t seem to get a temperature value that works.

Here’s my code:

- id: "1701257996901"
  alias: Update room temperatures
  description: ""
  trigger:
    - platform: state
      entity_id:
        - climate.ac
      attribute: temperature
  condition:
    - condition: state
      entity_id: input_boolean.synchronise_temperature
      state: "on"
  action:
    - service: climate.set_temperature
      data: "{{ state_attr('climate.ac', 'temperature') }}"
      target:
        entity_id:
          - climate.ac_bathroom
          - climate.ac_master_bed
          - climate.ac_entry
          - climate.ac_kitchen
          - climate.ac_living
          - climate.ac_bedroom_2
  mode: single

In the trace, the automation gets as far as calling the set_temperature service, then stops with the error “Error rendering data template: Result is not a Dictionary”

If I stick “{{ state_attr(‘climate.ac’, ‘temperature’) }}” in the Template tab of Developer Tools, it shows the correct temperature.

Never mind I figured it out, had to change this:

data: "{{ state_attr('climate.ac', 'temperature') }}"

to this

data:
  temperature: "{{ state_attr('climate.ac', 'temperature') }}"