Trying to pull a value from climate, but not succeding

I want to get this value (here taken from the MQTT-stream): climate/thermofloor_as_heatit_thermostat_tf_021_dry_air/temperature In this case the value is 22, but I just can’t seem to get it into my code. This is what I’m trying to use:

{
  "payload_template": "{{states.climate.thermofloor_as_heatit_thermostat_tf_021_dry_air.temperature}}",
  "topic": "eg/Termostat.Setpoint"
}

But I’m not getting anything from that. If I add “.state” at the end, the code doesen’t work at all. I have this working, from the info climate/thermofloor_as_heatit_thermostat_tf_021_dry_air/state

{
  "payload_template": "{{states.climate.thermofloor_as_heatit_thermostat_tf_021_dry_air.state}}",
  "topic": "eg/Termostat.modus"
}

That correctly shows the current mode, which is “heat”. So why isn’t the other code working in the same way?

Here is the code from the automations-file.

- action:
  - data:
      payload_template: '{{states.sensor.thermofloor_as_heatit_thermostat_tf_021_temperature.attributes.node_id}},{{states.climate.thermofloor_as_heatit_thermostat_tf_021_dry_air.temperature}}'
      topic: eg/Termostat.Setpoint
    service: mqtt.publish
  alias: Termostat 8 setpoint
  condition: []
  id: '1524901140399'
  trigger:
  - entity_id: sensor.thermofloor_as_heatit_thermostat_tf_021_temperature
    platform: state