How to change Hubitat Mode (to Night) by issuing a Google Assistant command

I am new to Hubitat as of yesterday, but I've added devices and successfully created my first Motion Lighting automation. I can't find anything about the following in the Community, but it seems like a common feature people would like to use, so I'll ask. How can I issue a Google Assistant command (or through a GA Routine) to change my Hubitat mode (to Night for instance)? I have added Hubitat to Google Home, and also added the Google Home app to Hubitat. Thank you for any guidance.

Probably many ways to do it. I'd do it this way.

  1. Create a virtual switch. Auto off after 5 seconds.
  2. Go into the google integration in HE, and allowed Google to see and modify virtual switch.
  3. Create a rule in HE that changes mode to night when switch is turned on.
  4. Open google app on phone, say sync my devices and see the new virtual switch appear.
  5. Say, "hey google, turn on virtual switch", (or optional) create a routine in google app to trigger it via easier phrase, such as "hey google, change mode to night".

I did it a little differently... As you say - there are many ways to do it.

I configured the Google Home integration in Hubitat, selecting the modes I want Google to have access to.

Then in Google Home, I added "Adjust Scene" to my 'bedtime' routine, and specified the Hubitat mode I wanted in the scene option ("Home-Night" in my case).

1 Like

Yeah, I just saw the the HE google integregation app has access to modes. Things you learn!

Yeah creating a routine and "adjust scene" is the way I do it for the not the everyday modes.

Thanks for the suggestions. It felt that JasonJoel's suggestion was easiest, and it worked perfectly. I appreciate it!

This ‘adjust scene’ mode switch works fine for me in my ‘Good night’ Google routine, except that Google Assistant says that there was an error in switching to the night scene. Does anyone else get this error? The mode seems to switch just fine, but I’m guessing that Google doesn’t get the confirmation that it wants?

1 Like

This is a Hubitat GH issue, you can do the same on the community GH integration and it wont do this.

Its a bit complex to set up currently but that's mostly due to the hoops you have to go though to get to google.

@bobbyD did you know about this issue with modes (scenes) in GH?

Yea, I just tested out GH for the first time to set night mode. Agree, it seems to mostly work (a few lights didn't turn off but I have a lot of lights) but I got google saying "sorry, something appears to have gone wrong in setting night mode". Sounds like a known bug from @BorrisTheCat. I'll have to research the community integration at some point.

1 Like

There is also a workaround using virtual switches.

I have tried this and it does not appear in google home and keeps disappearing out of my HE google home integration app. Any ideas?

Something's not right if you have devices disappearing out of HE google app. That will cause Google to hvae errors. Have you been restoring backups recently?

You'll need to get to the bottom of devices vanishing first. I've not had that problem, sorry.

Hi

It’s only the virtual device that disappears, all others are ok. I am assuming this is because google does not recognise or support it for some reason?

Is it a switch? Because google home only works with switches.

Hi Mike, they were set as switches however kept disappearing for some reason so Google would never see them. I have tried again today and it is now working :slight_smile:

I can now ask google to set home, away and night modes which put HE and BI into the relevant modes. Also have presence set as well for away and home mode however found this hit and miss so will keep testing.

1 Like