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.

    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:


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


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