Rest_command config help needed

Hi, I try to add a rest command to send a command from one HA to HA. I need to fill an input_text from a notifier. Andonly way I found is by using rest as notifier and send the text via rest to my input_text field. But I can not get It working, here is my actual config

    url: http://localhost:8123/api/services/input_text/set_value
    method: POST
      Authorization: 'Bearer eyJ0eXAi---changed-for-sharing---YbUgbxuNaK19zp26ztSgllAgDHGw'
      Content-Type: 'application/json'
    payload: '{"entity_id": "input_text.message_module","value": "{{ value }}"}}'

Maybe headers are not correct or something not sure. Using a shell command with curl for a similar thing to control HA from outside so authorisation key is correct and working.

Hope you have an idea why it is not working.

At the very least, it looks like you have one too many closing curly-braces at the end of the payload. Probably should be:

    payload: '{"entity_id": "input_text.message_module","value": "{{ value }}"}'
1 Like

You are right, thanks for the extra pair eyes :slight_smile:

1 Like