Trigger script from Google Home routine

As the title suggests I am trying to trigger a script from a google home routine. My scripts are exposed and appear under home control-devices in the google home app. They do not appear in the routine though, it appears to lights and switches only. Any suggestions? Someone suggested exposing the script as a switch but I cannot figure out how to do that. Thanks!

1 Like

there’s 2 ways you can expose a script as a switch:

or

I’ve had better luck with template_switches because it acts like a switch. Inputboolean doesn’t act 100% like a switch, it acts like a toggle only. Meaning you can only turn it on when it’s in the off state, and you can only turn it off when its in the on state. Template switch does not care about the state, you can turn it on or off regardless of the state.

2 Likes

Thanks! I will give it a shot.

If you are exposing your scripts to Google Assistant, you can also trigger them with:

activate <script name>
1 Like