Templating inside Lovelace call to script?

I have the following in my Lovelace which calls my script for 30 seconds.

  - action_name: fubar
    service: script.start_fubar
      seconds: 30
    type: call-service

I also have a helper input_number.fubar_time, which is currently set to 50.

How can I replace the hard-coded 30 value with the input_number multiplied by 0.5 so that the script will be called with passing in (50 * .05 = 25) seconds? As well as every execution of this fragment will always use the latest value of (input_number / 2)

Most, if not all, of the basic/core dashboard cards do not support templating. There are many custom cards that do such as Mushroom, Custom button card, etc.

Since you are already calling a script you could add the time value logic into the script instead of the card.