Hi,
I would like to ask google to trigger a script. So I can say “OK google, bedtime” and my bedtime script would run.
I have Google Assistent component set up, but I can’t see a way of asking google to run a script. At present the best alterative I have is to use Google Home shortcuts along with IFTTT to send an event to my Home Assistant. And have that event trigger the script.
That’s all fine except I don’t want IFTTT to act as a middle man - I’d like to cut it out completely. Any suggestions?
Two options
Okay google, turn on bedtime
Or the google assistant app allows you to set up shortcuts so set up a bedtime shortcut with the action “turn on bedtime”
So, “turn on” can run a script?
Yes it can
Setting it up as a shortcut would allow you to say OK Google, Bedtime
Thank you.
My individual scripts do not show up under:
Google Assistant -> Settings -> Home Control
Although there is an entry there called “all scripts”, so it must be possible to expose individual scripts to Google Assistant?
I just synced them so I know it’s up to date.
Is there a setting somewhere I need to expose?
Ah, I probably need to expose them in the Google Assistant part of configuration.yaml. I’ll look at that when I get home.
Cheers,
James
Yeah, not sure scripts are exposed by default. You can expose the whole domainnin the component config or individually in the customize platform config.
1 Like
I actually had “expose_by_Default” set to on, but they still didn’t show. anyway; having instead exposed the lights and the scripts only, and resynced my google account, they now show up.
Thanks for your help.
Ha. so, now I have another question! With IFTTT you can get Google Home to give a specifc reply when you activate an applet (e.g., I had it set up to say "Alright, good night!). With Google Home Shortcuts - you can’t. Unless anyone has information otherwise?
Nope you can’t. The smart home implementation used by the component doesn’t allowed for custom responses.
If you want that it’s IFTTT or building your own app using Dialogflow.
Thanks - seems a step too far. I might go back to IFTTT. I assume that using Google Home at all is still being processed in the cloud somewhere? So it’s still internet connection dependant. So not much difference between either method.