Api Ai - intents

The documentation shows great examples on figuring out script_intents.
But is there a way to use the intent to fire up an automation?

My purpose is that i already have rules to switch on home theater.
And want to add voice control. From the example on api.ai page it seems i have to copy all the actions from the automation to intent_script

But maybe there is a way to use the intent in some way in the trigger of the automation?

I’ve not implemented this yet but would it not be as simple as triggering your automation from an intent. Like the following…

TurnLights:
    speech:
      text: Turning {{ Room }} lights {{ OnOff }}
    action:
      - service: automation.trigger
        data:
          entity_id: automation.toggle_room_lighting
1 Like

Excellent! Great idea - forgot about the automation trigger