I have a Raspberry Pi connected to a smart plug that is exposed as a switch. I can switch it off, wait a few seconds and switch it back on to reboot the RPi remotely.
This feature is used in an automation that reboots it after my fiber is down, then up (for reasons).
I now would like to be able to use my Google Assistant integration to say
ok google reboot dash
I tried to go to the Settings of my automation, choose Voice Assistants, expose the automation and add an alias “reboot dash”.
This however does not work, Google Assistant gives me “helpful information” about unplugging my device and plugging it back. It is the same without any setup.
What is the correct way to attach a voice command to an automation?
I have never tried this with automations. Automations should not be called externally, but triggered. Use scripts for externally run things. (If you need to have it triggered by automations too, call the script from the automation. But that is a bit off topic).
Then, assuming Google Assistant is set up, you need to say " start <script name>".
The alias will just replace the script name. To get around it, you can create a routine in Google home with a voice starter and the scripts as an action. That way you can use any sentence you want.
It may be "start <automation name> too, but it is bad practice because there is no trigger and conditions are skipped when automationa are run manually.
Thanks for the pointer. I never used scripts (in the sense Settings → Automation and Scenes → Scripts, otherwise I have used pyscript, AppDaemon etc.).
They seem to be a more user-friendly version of automations (except the triggering and conditions of course). I will give that a try when back home, thanks!
If you mean that you need to have a Nabu Casa account to use Google Assistant - then no. There are very good, very precise step-by-step instructions about how to connect HA to Google Assistant yourself. It is quite convoluted though.
Otherwise I think this is rather a matter of knowing (for me) how to trigger the action, @Edwin_D gave some very good insights about that.