cancel
Showing results for 
Search instead for 
Did you mean: 

Presence sensing - "Choose at least one device to add an action to this routine"

nicolea
Community Member

I have a pixel 6, hub max and a nest mini.

 

Presence sensing seems to be set up fine with my phone and both devices turned on

 

 

If I try to create a home or away routine I get the error message:

 

"Choose at least one device to add an action to this routine" There are no devices available to add to this routine. You may be able to change existing device actions in this routine, or create a new routine.

 

 

I have 3rd party lights and various devices I'd like to use with these routines. 

 

Any clues? 

 

1 Recommended Answer

EricTsengTy
Community Member

Below are some steps that maybe you can follow. Hope it helps.

Background Knowledge

In my experience, only some types of devices can be triggered by the native Home & Away routines that Google provides for you, and I "guess" the supported devices are:

  • Nest thermostats
  • Smart plugs, switches, and lights

based on How Home & Away Routines can help.

Thus, I think at least those third-party lights you mentioned could work on the native Home & Away routines.

Furthermore, there's still a chance that you can use Home & Away routines on devices that are not natively supported by Script Editor.

 

Step 1. Add the device

  • Check your Devices tab in Google Home and make sure the device is added to your room (you can follow this: Assign devices to a room if you don't know how to).
  • If you can see the device in the Home routine or Away routine now, it means the device is natively supported. (Go to Step 2a)
  • Otherwise, it's not natively supported. (Go to Step 2b)

For example, I already have a TV, an air conditioner, and a Nest Mini 2 in my room. Now, I created a new light in my 3rd party app and linked it to Google Home but haven't added it to my room yet (Btw, it's a fake light bulb because I don't have one).

When I try to create an Away routine, it also says "Choose at least one device to ..." even if I already have some devices in my room. Clearly, both the air conditioner and the TV are not supported by Home & Away routine currently.

Screenshot_20230821-192030.png

Screenshot_20230821-210302.png

Then, after adding the light to the room, the Away routine suddenly works!

Screenshot_20230821-191756.png

Screenshot_20230821-210631.png

 

Step 2a. Home & Away Routines for Supported Devices

Just click Automations > Home or Automation > Away and do whatever you want.

 

Step 2b. Home & Away Routines for Unsupported Devices

Notice that the "unsupported devices" here are only not supported by the native Home & Away Routine but still need to be supported by Google Home.

Currently, we need Script Editor to deal with those unsupported devices. It also means that you need to learn the basic syntax of Script Editor. For Android / Web version users, to enable Script Editor, you need to join Public Preview for Google Home app. For iOS users, I don't have an iOS device, but I think you can't create a scripted automation with your phone (maybe still can edit an existing one).

In Script Editor, the starter can be written as below to detect if everyone is away:

 

 

  starters:
    - type: home.state.HomePresence
      state: homePresenceMode
      is: AWAY

 

 

Also, you can change the "AWAY" to "HOME" to detect if someone is at home.

Here I provide my script that turns off the air conditioner when everyone leaves.

 

 

metadata:
  name: Away - Script
  description: A series of actions when everyone leaves home

automations:
  starters:
    - type: home.state.HomePresence
      state: homePresenceMode
      is: AWAY

  actions:
    - type: device.command.ActivateScene
      activate: true
      devices: Power off Air

 

 

"Power off Air" here is a scene I create in my 3rd party app, which would turn off the air conditioner when being activated. Though creating scenes is not the only way to control those unsupported devices (e.g. use the OkGoogleCommand as action, which might be easier), it's a good practice to do so in my own opinion.

View Recommended Answer in original post

4 REPLIES 4

nicolea
Community Member

I have a pixel 6, hub max and a nest mini.

 

Presence sensing seems to be set up fine with my phone and both devices turned on

 

 

If I try to create a home or away routine I get the error message:

 

"Choose at least one device to add an action to this routine" There are no devices available to add to this routine. You may be able to change existing device actions in this routine, or create a new routine.

 

 

I have 3rd party lights and various devices I'd like to use with these routines. 

 

Any clues? 

Screenshot_20230821-084615.png

Screenshot_20230821-084651.png

Screenshot_20230821-084559.png

Screenshot_20230821-085227.png

EricTsengTy
Community Member

Below are some steps that maybe you can follow. Hope it helps.

Background Knowledge

In my experience, only some types of devices can be triggered by the native Home & Away routines that Google provides for you, and I "guess" the supported devices are:

  • Nest thermostats
  • Smart plugs, switches, and lights

based on How Home & Away Routines can help.

Thus, I think at least those third-party lights you mentioned could work on the native Home & Away routines.

Furthermore, there's still a chance that you can use Home & Away routines on devices that are not natively supported by Script Editor.

 

Step 1. Add the device

  • Check your Devices tab in Google Home and make sure the device is added to your room (you can follow this: Assign devices to a room if you don't know how to).
  • If you can see the device in the Home routine or Away routine now, it means the device is natively supported. (Go to Step 2a)
  • Otherwise, it's not natively supported. (Go to Step 2b)

For example, I already have a TV, an air conditioner, and a Nest Mini 2 in my room. Now, I created a new light in my 3rd party app and linked it to Google Home but haven't added it to my room yet (Btw, it's a fake light bulb because I don't have one).

When I try to create an Away routine, it also says "Choose at least one device to ..." even if I already have some devices in my room. Clearly, both the air conditioner and the TV are not supported by Home & Away routine currently.

Screenshot_20230821-192030.png

Screenshot_20230821-210302.png

Then, after adding the light to the room, the Away routine suddenly works!

Screenshot_20230821-191756.png

Screenshot_20230821-210631.png

 

Step 2a. Home & Away Routines for Supported Devices

Just click Automations > Home or Automation > Away and do whatever you want.

 

Step 2b. Home & Away Routines for Unsupported Devices

Notice that the "unsupported devices" here are only not supported by the native Home & Away Routine but still need to be supported by Google Home.

Currently, we need Script Editor to deal with those unsupported devices. It also means that you need to learn the basic syntax of Script Editor. For Android / Web version users, to enable Script Editor, you need to join Public Preview for Google Home app. For iOS users, I don't have an iOS device, but I think you can't create a scripted automation with your phone (maybe still can edit an existing one).

In Script Editor, the starter can be written as below to detect if everyone is away:

 

 

  starters:
    - type: home.state.HomePresence
      state: homePresenceMode
      is: AWAY

 

 

Also, you can change the "AWAY" to "HOME" to detect if someone is at home.

Here I provide my script that turns off the air conditioner when everyone leaves.

 

 

metadata:
  name: Away - Script
  description: A series of actions when everyone leaves home

automations:
  starters:
    - type: home.state.HomePresence
      state: homePresenceMode
      is: AWAY

  actions:
    - type: device.command.ActivateScene
      activate: true
      devices: Power off Air

 

 

"Power off Air" here is a scene I create in my 3rd party app, which would turn off the air conditioner when being activated. Though creating scenes is not the only way to control those unsupported devices (e.g. use the OkGoogleCommand as action, which might be easier), it's a good practice to do so in my own opinion.

nicolea
Community Member

Perfect thank you. I added my lights (yeelights) to rooms and these became available in the home / away routines. I'll check out the script editor for working with other devices.

With my automations sometimes I use the "Try adding your own" actions for custom Google Assistant commands - is this something you've tried in script editor? (e.g. "set air conditioner to minimum"). I'll start researching this.

 

Thank you so much for helping me fix the home/ away issue

You're welcome. I'm also struggle with the same problem (and lots of other problems) for a long time before. 

I ever tried the "Try adding your own" before, and it's kinda convenient sometimes (because currently the google assistant is much more clever than the Google Home UI). And yes, the function is the same as the OkGoogleCommand in script editor.

However, seems like "Try adding your own" doesn't work in native Home & Away routine, so we still can only use the script editor if you wanna add actionsi n Home or Away routine.