Problem updating climate settemp with value from MQTT

Hi everyone ! - new to Homeassistant - Openhab user until now :wink:

I am trying to set up an automation to get triggered by a certain mqtt topic and insert the payload as target-temperature for an existing climate entity in Homeassistant.

I am struggling to find the right syntax - and cannot get it working. I am unsure if - and how I should insert a data: or data_template: part in the automation to reference the mqtt payload?

Right now, nothing happens (no change of target temp if I manually send a value (i.e. ‘29’) to the mqtt topic…

Any help for a beginner is appreciated :wink:

This is my automation;

- id: '1608676157336'
  alias: Settemp Millheat Bedroom
  description: ''
  trigger:
  - platform: mqtt
    topic: homeassistant/climate/master_bedroom/command/temperature
  condition: []
  action:
  - service: climate.set_temperature
    entity_id: climate.master_bedroom
  mode: single

Here are multiple examples.
data_template works, but is no longer needed since a few versions.
You can get the mqtt payload from the trigger with {{ trigger.payload }}

    action:
      - service: climate.set_temperature
        data:
          entity_id: climate.master_bedroom
          temperature: "{{ trigger.payload }}"

So, now my automation looks like this - but still no update happens? what am I missing ?

I am using an mqtt client to publish a value to the topic mentioned, but Homeassistant does not seem to pick it up and update the climate temp. My MQTT connection from/to HA otherwise works… Any ideas ?

- id: '1608676157336'
  alias: Settemp Millheat Bedroom
  description: ''
  trigger:
  - platform: mqtt
    topic: homeassistant/climate/master_bedroom/command/temperature
  condition: []
  action:
  - service: climate.set_temperature
    data:
       entity_id: climate.master_bedroom
       temperature: "{{ trigger.payload }}"
    mode: single

Something in the logs?
Try "{{ trigger.payload | float }}"

Edit: Your indentation is also wrong.

- id: '1608676157336'
  alias: Settemp Millheat Bedroom
  description: ''
  trigger:
  - platform: mqtt
    topic: homeassistant/climate/master_bedroom/command/temperature
  condition: []
  action:
  - service: climate.set_temperature
    data:
      entity_id: climate.master_bedroom
      temperature: "{{ trigger.payload }}"
  mode: single

It works ! Fantastic. Thanks !