Rest command Action data field

Hey there,

I’m setting up notifications (rest_command), but I need to create an Action field.

I added the following code in configuration.yaml

rest_command:
  send_alarm:
    url: "https://example.com/alarm/ha.php?msg={{ message | urlencode }}"

But unfortunately the Action field does not appear.

If I manually add it to the following:

data:
  message: 💧💧💧 Water detected
action: rest_command.send_alarm

Is there a way to make it display Action data field without manually changing the YAML? What am I missing?

Thanks!

Fixed:

Added to scripts.yaml

send_alarm:
  alias: "Send alarm to Jabber"
  mode: single
  fields:
    message:
      name: Alarm text
      description: Message
      required: true
      selector:
        text:
  sequence:
    - service: rest_command.send_alarm
      data:
        message: "{{ message }}"

Now I have a custom field :)) I hope this will be useful.