Dynmic values for restful command within json payload

Hi, I have this rest command to update my thermotstat, It works fine and set the target tempiture to 17.

 rest_command:
  thermostat_update_target:
    url: http://192.168.168.108:10000/retrieve
    method: POST       
    payload: '{"update_message": {"seqnr": 0,"account_auth": {"user_account": "","mac_address": "aa:aa:aa:aa:aa:aa"},"control":{"ch_mode_temp" : 17 }}}'

I want it to update from a input number. but all my attempts fail. Basically how do i replace the 17 with this:

'states.input_number.set_temp_heater.state

any help would be great. (i’m quite new to this, so please keep the answers simple!)

Thanks

1 Like

sorry found it!

payload: ‘{“update_message”: {“seqnr”: 0,“account_auth”: {“user_account”: “”,“mac_address”: “b8:27:eb:a4:01:0a”},“control”:{“ch_mode_temp” : {{ states.input_number.set_temp_heater.state }}}}}’

1 Like