I have Google assistant set-up in HA and it is working very well. I can give Google Home commands like “close garage door” and it works as expected. But I some commands it doesn’t seem to understand. For example, if I say “set alarm to armed home” it thinks I’m trying to set a timer or alarm clock.
Am I able to make automations based around custom commands? Like if I say “arm the house” can that trigger an automation to arm my HA alarm?
You can use the Google Home App on your Smartphone to create Routines (previously known as Shortcuts). You define the phrase then set the actions Google Home should execute.
I have a script which is called “house alarm”. I didn’t need to set up anything in the Google Home app (like a Routine) because I have ‘scripts’ exposed to Google Assistant and I can simply say “Hey Google, activate the house alarm” which will trigger HA to run the script.
Dear sparkydave is it possible to send me a few example of the scripts that can trigger an automation or an actuon in Google home by Voice. Thanks a lot! My regards! Ivan
Its nothing complicated, if you create a script and expose it to Google you can simply say ‘hey google, activate house alarm’ and the following script will run: house_alarm.yaml
house_alarm:
alias: House Alarm
# alias: Turn house alarm ON in away mode after an exit delay (plus the usual alarm exit delay)
sequence:
- service: tts.google_say
entity_id: media_player.kitchen
data:
message: 'Arming house alarm in one minute'
- delay: '00:00:30'
- service: alarm_control_panel.alarm_arm_away
entity_id: alarm_control_panel.house
@sparkydave how does one take a script and “expose it to Google”? Currently, I use HACloud and I can expose lights to GA… not sure how to expose scripts.
Ah, nice!..Thanks @sparkydave I’ve not been in the Cloud docs for some time… very handy now and tons of features!
So is the only way to setup scripts to verbal phrases is to use GoogleHome shortcuts?
Curious how you link “what to say” with non-standard domains like “scripts”?
No need to setup anything in Google Home once you have the scripts exposed, they just work. As far as Google is concerned, they aren’t non-standard I guess. Saying ‘start’ or ‘activate’ will tell Google that you are reffering to the script. Also, in your HA yaml you can have ‘aliases’ for the scripts to call them something simple or different in Google Home
I was searching now online how to do this and I did that using Scenes. Actually I needed a way to disable my automation which triggers the light by motion because sometimes I don’t need this at night
I created a Scene and assigned the value of the automation to be OFF by clicking on the Entity. then in Google Home app I called " Sync my devices" , then go to “Routines” and create a new routine and set the action to activate the “Scene” you have created. This has worked for me now while I am writing this down.
and i can controll it trough google assistant, however the other 2 persons in my home can’t, so will try to add include domains and se if it solves it
thank you
edit…
that kinda made every other integrations dissapear… and i cant add them in the ui
“Editing which entities are exposed via this UI is disabled because you have configured entity filters in configuration.yaml.”
in your config and do the rest in ‘Integrations’ (as far as I know). I personally use yaml for my cloud config and only use ‘Integrations’ for certain things, not this.
Hi, I had create a lot of scripts for google assistant to change channel on TV, it is work but I think it is can be better solution.
I have following scripts:
Set 1 channel
Set 2 channel
…
Set 33 channel
Is it possible to create one script with a parameters? For example: Set “number” channel?
Maybe can I write a python script? But Google assistant can’t understand this script(((
Hi, yes I tried but google assistant can’t recognize a script
Script alias: set channel
I says: Ok google, set 2 channel
Google search in the internet set 2 channel