Creating trigger when script is started/turned on

I’m trying to create a trigger when a specific script is turned on/started. Below is what I have in my automation, but the automation is not being triggered when script.gate_toggle has been started/turned on. Below is the yaml and also a screen-shot of the automation. Do I know have the right event?

  - platform: event
    event_type: script.script_started
      entity_id: script.gate_toggle
    id: gate-toggled

Any pointers appreciated. I was having trouble finding where I can get a list of these possible events foro an entity. I was looking here to see what events are fired for a script

The event type would be just script_started, not script.script_started. Or, you should be able to achieve the same thing by triggering on the state of the script changing to on.

1 Like