Dynamic variables from payload in on_message action

I’m wondering if it’s possible to insert data from the MQTT payload into the ‘then’ action for on_message. For example, for the code below I currently have it hardcoded as 20°C, but instead I’d like to set the target_temperature to what’s provided in the message:

  on_message:
    - topic: esphome/climate/aircon/target_temperature/set
      qos: 1
      then:
        - climate.control:
            id: "aircon"
            target_temperature: 20°C

e.g. something like this:

  on_message:
    - topic: esphome/climate/aircon/target_temperature/set
      qos: 1
      then:
        - climate.control:
            id: "aircon"
            target_temperature: {payload} + "°C"