Input Slider state from sensor

Hi
im creating a input slider there will get its state from mqtt.

i have createt a sensor with the value in but i cant get the automation to work
here it is

  • action:
    • alias: slider temp test
      data:
      entity_id: input_slider.target_temp
      value: ‘{{ states.sensor.setpoint.state | int }}’
      service: input_slider.select_value
      alias: Temp set test
      condition: []
      id: ‘1504170026688’
      trigger:
    • platform: mqtt
      topic: PIDVarme/StueSensor02

if i use the template editor it give me the rigth value with value: ‘{{ states.sensor.setpoint.state | int }}’

hope somone can help

data: may need to be data_template: and/or value: should probably be value_template:

Please can you select your code in the edit box and press </> to get the correct formatting as it’s very important in yaml.

Thanks it help to make data_template. :slight_smile: