How do I expose a command that takes variable?

I have a REST command set like this:


rest_command:
  call_libenske_doky_api:
    url: "https://XXXXXXXX/api.php"  # URL without parameters now
    method: POST
    verify_ssl: true
    payload: >-
      username=XXXXXX&password=XXXXXXXX&action={{ action }}
    content_type: 'application/x-www-form-urlencoded'

And I use it with automation like this:

alias: Elevator
description: ""
triggers:
  - event_type: myhome_cen_event
    event_data:
      event: pushbutton_short_press
      object: 1001
      pushbutton: 1
    trigger: event
conditions: []
actions:
  - action: rest_command.call_libenske_doky_api
    data:
      action: elevator
mode: single

How can I expose this to my Voice assistant? If I expose the automation, it does not trigger it. If I expose the rest command, it does not fill in the variable. Any ideas? Thanks!