Alexa RunScriptIntent

I am trying to get the RunScriptIntent working as I was able to do with the ActivateSceneIntent. I was able to get both responding without errors on both the HA and Amazon side when testing in the Amazon Alexa Service Simulator and calling scenes via “Alexa tell home assistant turn on {scene}” however when I call a script it does not error but does not activate the script. For example if I do “Alexa tell home assistant to run livingroom fan”. Here is the script I am attempting with:


    - service: homeassistant.toggle
        entity_id: switch.livingroom_fan


- platform: tplink
  name: Livingroom Fan


> RunScriptIntent:
>     action:
>     service: script.turn_on
>     data_template:
>       entity_id: script.{{ Script | replace(" ", "_") }}
>     speech:
>       type: plain
>       text: alexa_confirm.yaml

Please format your code properly.

Your script name is toggle_livingroom_fan which will not work when you call Alexa tell home assistant to run livingroom fan. It is looking for a script script.livingroom_fan

My mistake I acutally had script.livingroom_fan and script.toggle_livingroom_fan trying to get this working. Trying either “alexa tell home assistant to run livingroom fan” or “alexa tell home assistant to run toggle livingroom fan” both do not trigger the fan. The input boolean tied to the script works fine and activates however.

Any ideas would be greatly appriciated!