How do I call a script from another script and pass a variable to it?

I’ve been trying for the best part of the day now to call a script that opens an app on my Android TV. Calling it with hardcoded app name works, but then I did a script with a variable instead of the app name, so I can make other scripts that call this script, passing just the app name, and have a “YouTube” script, a “Netflix” script, etc etc

The problem is, I can’t manage to pass the variable down, no matter what I try. I found some topics on here, that all say different stuff, so I tried pretty much everything: data, data_template, data_template.variables… Nothing works.

Here are my scripts:

launch_app:
  alias: launch_app
  sequence:
  - service: media_player.turn_on
    data:
      entity_id: media_player.tv_salon
  - service: androidtv.adb_command
    data:
      command: " monkey -p {{ app_name }} -c android.intent.category.LAUNCHER 1"
      entity_id: media_player.tv_salon
youtube:
  alias: YouTube
  sequence:
  - service: script.launch_app
    data:
      app_name: "com.google.android.youtube.tv"

What am I doing wrong ?

Couple things look wrong on the first script:

launch_app:
  alias: launch_app
  sequence:
  - service: media_player.turn_on
    data:
      entity_id: media_player.tv_salon
  - service: androidtv.adb_command
    data_template:   #<-- Must be data_template if defining a template
      command: "monkey -p {{ app_name }} -c android.intent.category.LAUNCHER 1" #<--Removed space at beginning of string
      entity_id: media_player.tv_salon

Thanks for the repy! Yeah I later figured out what I was doing wrong on my own.