How to call a script with alexa, and evaluate the input?

I’ve already set up emulate_hue and successfully trigger a script as follows:

emulated_hue:
  listen_port: 80
  expose_by_default: false
  entities:
    script.testscript:
      name: "Testscript"
      hidden: false
 
testscript:
  sequence:
    - service: notify.mobile_app_me
      data:
        title: "Alexa Input Test"
        message: "how can I get the input here??"

how can I read the input in my script (eg ‘on’ or ‘off’ based on the speech command somebody gave alexa?)

I don’t think that’s possible.

You will have to create two scripts - one for on & the other for off.

Then you can create a routine in the alexa app to trigger the correct script when you say the phrase that corresponds to the desired script.