Service Creation Help

Hi
I need help here !
i have a RESTapi device that can send sms with that kind of call :

curl "http://192.168.42.8/sms?num=0606060606&msg=ALARME_ON"

or
with my browser using http cmdline

Please help me to build a homeassistant automation called “alarm_detection”, when there is an intrusion, that will use that RESTapi to send SMS.
I need to send with parameters num and msg
Thanks for your help
Regards

Assuming an input_text containing your message, it could be something like this:

shell_command:
  send_sms: curl "http://192.168.42.8/sms?num=0606060606&msg={{ input_text.message }}"

no space allowed, or you’ll have to do htmlencoding

I’d rather go through a restful command, to avoid going through the shell

rest_command:
  send_sms:
    url: "http://192.168.42.8/sms?num=0606060606&msg={{ input_text.message }}"

i will use rest_command (thx koying) but please explain how to manage input_text.message? i assume it is a variable? but i don’t know how to create and manage variable in homeassistant
please help me to understand
regards

Create a text helper

Open your Home Assistant instance and show your helper entities.

Then, it is your job in the automation to initialize it before calling the rest_command.

Thanks all
I will try today and keep you inform