cancel
Showing results for 
Search instead for 
Did you mean: 

assistant.event.OkGoogle doesn't work

detetlow
Community Member

I've tried creating some really simple scripted Home automations using the starter:

 

starters:
- type: assistant.event.OkGoogle
eventData: query
is: test phrase

 

and a simple action to turn a light on with no Conditions...

 

But when I try to trigger them using the test phrase with Gemini on my Pixel, it recognises it's supposed to start a routine/automation ("Okay, starting your routine" and "You used a command to start an automation that can be edited in the Home app") but then a second later it shows another message "It looks like there isn't an automation set up for that yet". Which is completely contradicting itself - and nothing further happens. Nothing shows up in the Home activity tab and I can't see any way to further diagnose this. 

Am I doing something wrong here? I tried switching to using the old Google Assistant on my phone but that did nothing either and didn't generate any messages at all.

Thanks

3 Recommended AnswerS

Suc_dpe
Solutions Expert
Solutions Expert

The assistant.event.OkGoogle starter isn't triggering your automation properly. This is a known issue with the Gemini integration on Pixel devices.

When you say the test phrase, Gemini recognizes it should start a routine but then fails to find/execute it, giving conflicting messages.

Instead of using assistant.event.OkGoogle as the starter, create a custom voice command starter with your exact phrase. Go to:

  • Starters → Voice command
  • Enter: "test phrase"

This bypasses the OkGoogle event handler and uses direct phrase matching, which is more reliable with Gemini.

If that still fails: The issue may be Gemini not properly handing off to the Home automation system. Try temporarily switching your default assistant back to Google Assistant (not Gemini) in your phone settings to test if the automation works there.

This is a Gemini integration bug we're tracking. Report it through the Home app feedback with your exact setup details.

View Recommended Answer in original post

detetlow
Community Member

Thanks - can you tell me where the custom voice command starter is, I can't see it in the Scripting documentation?

I've already tried using Google Assistant instead of Gemini, it does nothing either and doesn't even bother to give an error or tell you it's recognised it as a routine.

View Recommended Answer in original post

Suc_dpe
Solutions Expert
Solutions Expert

To find the custom voice command starter option in the Google Home app:

  1. Open Google Home app
  2. Tap Automations (or Routines)
  3. Create new automation or edit existing one
  4. Tap "Add starter"
  5. Select "Voice command" (not "assistant.event.OkGoogle")
  6. Enter your exact trigger phrase

If the "Voice command" option isn't visible as a starter type, make sure your Google Home app is fully updated.

Regarding Google Assistant doing nothing - that's actually expected behavior if you haven't created the automation yet. Once you set up the automation with the voice command starter, Google Assistant will recognize and execute it when you say the phrase.

The key difference: assistant.event.OkGoogle is an event-based trigger (which has the Gemini bug), while "Voice command" is direct phrase matching (which works reliably).

View Recommended Answer in original post

6 REPLIES 6

Suc_dpe
Solutions Expert
Solutions Expert

The assistant.event.OkGoogle starter isn't triggering your automation properly. This is a known issue with the Gemini integration on Pixel devices.

When you say the test phrase, Gemini recognizes it should start a routine but then fails to find/execute it, giving conflicting messages.

Instead of using assistant.event.OkGoogle as the starter, create a custom voice command starter with your exact phrase. Go to:

  • Starters → Voice command
  • Enter: "test phrase"

This bypasses the OkGoogle event handler and uses direct phrase matching, which is more reliable with Gemini.

If that still fails: The issue may be Gemini not properly handing off to the Home automation system. Try temporarily switching your default assistant back to Google Assistant (not Gemini) in your phone settings to test if the automation works there.

This is a Gemini integration bug we're tracking. Report it through the Home app feedback with your exact setup details.

detetlow
Community Member

Thanks - can you tell me where the custom voice command starter is, I can't see it in the Scripting documentation?

I've already tried using Google Assistant instead of Gemini, it does nothing either and doesn't even bother to give an error or tell you it's recognised it as a routine.

Suc_dpe
Solutions Expert
Solutions Expert

To find the custom voice command starter option in the Google Home app:

  1. Open Google Home app
  2. Tap Automations (or Routines)
  3. Create new automation or edit existing one
  4. Tap "Add starter"
  5. Select "Voice command" (not "assistant.event.OkGoogle")
  6. Enter your exact trigger phrase

If the "Voice command" option isn't visible as a starter type, make sure your Google Home app is fully updated.

Regarding Google Assistant doing nothing - that's actually expected behavior if you haven't created the automation yet. Once you set up the automation with the voice command starter, Google Assistant will recognize and execute it when you say the phrase.

The key difference: assistant.event.OkGoogle is an event-based trigger (which has the Gemini bug), while "Voice command" is direct phrase matching (which works reliably).

detetlow
Community Member

Hi - thanks but that's not using the scripting? That's just using the built-in automation wizard.

CalvinP
Community Member

I had the same problem! And I've found a solution after much blood, sweat and tears. Go to your Home app, and follow this path: Tap Profile picture>Home Settings>Google Assistant>Routines

Create a new Personal Routine in that view, and save it. Run it, and it works! But do not open it in the new Automation editor, I don't know if opening it breaks it or saving it. But I opened it and saved it in Automation view, changing nothing, and it broke it. Additionally, each device has to be controlled individually, you can't enter custom actions or it won't work, unfortunately.

 

You're welcome! Enjoy! 

simsalabimo
Community Member

My automation does nothing when using assistant.event.OkGoogle. I am not using Gemini.  It works using other starters.  I've tried deactivating/reactivating.  I've tried changing the "is".  I've tried making a whole new script.  I've tried editing the script both through the app and through the web interface.  My Google Home app is fully up to date.

 

assistant.event.OkGoogle is fully broken.

 

my script:

# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #

metadata:
name: Script natural light 2 # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
description: activates lights in appropriate time based mode # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”

automations:
- starters:
- type: assistant.event.OkGoogle
eventData: query
is: natural light
- type: time.schedule
at: 11:36

condition:
type: time.between
before: sunset
after: 11:00

actions:
- type: assistant.command.OkGoogle
devices: Bedroom display - Bedroom
okGoogle: activate energize
- type: assistant.command.Broadcast
message: I hear you
devices: Bedroom display - Bedroom