Is there any generic way to have spoken commands into a Google Home/Assistant device call an automation defined in Home Assistant?
Mine works by saying, "Hey, Google, Activate… [The automation]
Did you first have to implement the google assistant HA integration?
And if so, does your automation (the one you’re able to trigger with your voice) appear in the Google Home app as a device?
Yes I have added the HA integration for Google and no it does not show up.
do you explicitly “expose” the automation (either by specifying in exposed_domains
or manually exposing the automation)?
According to the documentation, only scripts and scenes can be exposed (but not automations). Is it possible you’re exposing a Scene?
It wont do automations, what you need to do is write the automation you want as a script, a script is really just an automation with out a trigger, it will then be available to Google, I have an automation that sets up the living room at sun down, so, closes the curtains and blinds turns the TV on and sets the lights, I then re-wrote that as a script so if I am in the living room early I just say Hey Google Activate evening mode.
Thanks for clarifying! I’m having issues getting scripts to be reachable on Google Home (the Home app sees them, but when I use my voice "hey Google, activate " she just replies she doesn’t understand. I’ve asked for help in another thread here.
so I figured it out, and like a lot of things with Google Home/Assistant, it’s frustrating that my experience is different from others, but here’s the gist:
- if I have an exposed script titled “lock up the house”, telling Google Assistant (via voice) to “activate lockup the house” simply results in her saying she doesn’t understand. I’ve also tried “start” instead of “activate” (not to mention lots of permutations of “activate the script…” after all, I know the Google Home cloud knows of these scripts (because I see them referenced in the app).
- however, if I create an automation in Google Home, and I have the action of that automation be to supply a text-based prompt to Google Assistant “lock up the house”, this works perfectly. One would think a programmatically supplied string would result in the exact same response as a verbatim spoken version of the same text, but it doesn’t
So this works out well, because by using a more natural spoken prompt to initiate the Google Home automation, I can omit the “activate” and it still works well.