I have Google assistant running on a Google mini and i have it working with home assistant (hass.io) directly via the non-cloud method. I can use it to turn on and off things as well as the climate control. Everything i have is interfaced directly through hass.io. It works great. But i want more advanced features than just on or off. For instance to find when the next bus is i have to say “turn on when is the next bus” to activate my bus script.
I want to be able to say stuff like;
“ok Google close the garage door”. This will interact with a template switch to close the door, and if the door is already closed (on) it will say the door is already closed. Currently it only works as turn on or turn off the garage door. But i want to say close and open.
"ok Google where is Emily’ (my wife), this will return the status of a template sensor which is either “home” , “work” “friends house” etc.
“Ok Google what is the temperature in the sunroom” it will tell me the sunroom temp.
Should i be researching into dialogflow component to get this up and running out should i use iftt or is there a better way. If like to try and avoid to much delay as well. Also i don’t want to have to say ok Google talk to home assistant and then the command.
+1 for shortcuts when it comes to running scripts. This has worked really well for me.
Returning sensor values is something I hadn’t thought of. I’d assume this would require the sensor to be exposed to Google, which currently isn’t supported according to the docs. Interested to see what others might have to say on this topic as well.
For the garage door I am able to say open close because I have it configured as a Cover component and not a template switch. Not sure if that would help you at all? Using a shortcut would probably work here too, but I don’t think it would return your desired “garage door is already closed.”
I forgot they actually just renamed Shortcuts to be part of the Routines functionality. Basically it lets you define within the Google Home app that when you say X, it should then do Y. So in this case you could create a Routine for whenever you say “Okay Google, Close the Garage Door” the Assistant will actually run the command “Turn Off Garage Door.”
I use a script as I have a reed switch that will tell me if the garage door is open or not.
I’ll then call the script within google home using a “routine” so i can ask google if “I left the garage open” or “Is the garage door open”, etc.
garage_door_status:
alias: "Garage Door Status"
sequence:
- service: tts.google_say
entity_id: media_player.family_room_speaker
data_template:
message: >
{% if is_state("sensor.garage_status", "closed") %}
Yes, the garage door is closed.
{% endif %}
{% if is_state("sensor.garage_status", "open") %}
No, the garage door is still open. Let me close it for you.
{% endif %}
cache: true
- service_template: >
{% if is_state("sensor.garage_status", "open") %}
cover.close_cover
{% endif %}
Also use this for temperature:
garage_temp:
alias: "Garage Temperature"
sequence:
- service: tts.google_say
entity_id: media_player.family_room_speaker
data_template:
message: 'The garage temperature is {{ states("sensor.garage_temp") }} degrees'
cache: false
This is fantastic! Will definitely try it out. Only downside is the need to manually set these scripts and routines up for each individual device/sensor, but I’m sure it’s only a matter of time before someone writes some code to make it easier…
I am testing out a custom find my phone script. Why am I doing this. It’s because I have multiple phones and I hate having to wait for google to ask me what phone I want and run through the list.
Just a note… In Australia and probably other non-US places, Routines are not available. We only have Shortcuts. We also can configure Continued Conversation but that is not working yet even though activated…
Came across this post in search of shortcuts or routines. However, on my iPhone in the Google Home app, nor in the Google Assistant app, I can’t find shortcuts nor routines. For context, I am living in the Netherlands.
Am I not looking good enough?
Maybe good to note that I am using my Google Suite account. Maybe this is the differences, as Google Assistant also doesn’t support calendar integration yet for those accounts.
routines / shortcuts is not yet available for the dutch market, maybe in a few months
google rolled out routines to more countries this week, but still not in dutch
i am working with google aliasses, you can configure them in HA, this will accompllish the same as routines/shortcuts from google
so if you have a script like “watch tv” , expose that entity and make aliasses, so you can say “watch tv” in different ways :
example :
switch.tv:
name: Watch TV
expose: true
room: Harmony
aliases:
- TV
- Televisie
- Television
…
so as you can see, you can combine languages in your aliasses
But if I understand correctly, with these aliases you still have to say; ‘Hey Google, turn on Televisie’.
The question this topic is about is not turning stuff on, but have other context like ‘Hey Google, where is my wife?’, ‘Hey Google, what is the temperature in room X’?