cancel
Showing results for 
Search instead for 
Did you mean: 

Script editor does not recognize Home Sensing from my Google Home App

JerryInTennesse
Community Member

I would like to write a script that will turn on my porch lights when I arrive home after dark. I want to use "Presence Sensing" as the starter, and "time. Between" (after Sunset and before Sunrise) as the condition.

I have my phone setup for Presence Sensing but I continually get this error:

JerryInTennesse_0-1687083331766.png

I checked my App Permissions to make sure Location was enabled all of the time. What else can it be?

 

 

14 REPLIES 14

Cathal_S
Gold Product Expert
Gold Product Expert

Hi there,

Please have a look at the Google Nest help center link below for some troubleshooting help with the home/away assist feature.

https://support.google.com/googlenest/answer/9261396 

 

Regards,
Cathal

I looked at the link but the trouble shooting is for when Presence Sensing doesn't work. Mine does work straight out of the Home app but I can't use it in the script editor. There I get an error message that it is not setup. That's what I need fixed.

Hi again,

Can you please share your full automation using the 'code' forum option.

Screenshot 2023-06-18 13.02.18.png

 

 

Regards,
Cathal

metadata:
  name: Turn Outside lights on # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
  description: When arriving home after dark # 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: home.state.HomePresence
      state: homePresenceMode
      is: HOME

  condition:
    type: time.between
    # Optional. Accepts either clock time (10:00:00 AM, with seconds optional, or in a 24 hour format), or 'sunrise' or 'sunset', with an optional offset ('sunrise+10m', for instance)
    before: sunrise
    # Optional. Accepts either clock time (10:00:00 AM, with seconds optional, or in a 24 hour format), or 'sunrise' or 'sunset', with an optional offset ('sunrise+10m', for instance)
    after: sunset

  actions:
    - type: device.command.OnOff # Turn the device on or off.
      on: true
      devices: Front Porch - Outside
    - type: device.command.OnOff # Turn the device on or off.
      on: true
      devices: Carport - Outside

I stripped the comments to make it more readable. The error shows up on the 'type' statement under 'starters'

JerryInTennesse_0-1687097656864.png

Claims that Presence Sensing is not setup in Google Home but I can use the 'Home' and 'Away' Household Routines just fine in Google Home app.

 

Edit: I can use 'Home' to turn on my outside lights when I arrive home but I can't condition the routine to only work during dark hours. That's why I'm attempting to do this through a script so I can control when the routing will be active or not.

BTW: Condition fields should be available to use in the Google Home app. It would make the routines so much more powerful.

 

 

Hi again,

Can you try something simple like the code below just to test if the home.presence is actually working?

 

 

automations:
  starters:
    - type: time.schedule
      at: 15:50

      weekdays:
        - MON
        - TUE
        - WED
        - THU
        - FRI
        - SAT
        - SUN

  condition:
    type: home.state.HomePresence
    state: homePresenceMode
    is: HOME

  actions:
    - type: device.command.OnOff
      devices:
        - Front Porch - Outside
        - Carport - Outside
      on: true

 

 

Changing the time to something soon so you can test if it works while you are set as at 'home'.

 

 

Regards,
Cathal

I had to add the Metadata but it still had an error on line 19.

Script Editor Error.jpg

Thank you for your testing and feedback.

I will mark this post for the attention of a Google Nest representative.

 

Regards,
Cathal

V0idmain
Community Member

I'm not able to get this working either and have contacted google support about it. They ended up telling me to send this through feedback in the app with the code and title "GHT3 <34412> Presence sensing not available in public preview". i can't remember ever hearing back from anyone after submitting feedback via a google app.

My issue may differ from yours, but the outcome is the same.

In the app, the presence sensing option is not under settings for me (i'm in the public preview). I also don't see any options to use it when creating a routine in the app. The app has full access to my location at all times.

In my home, I have a nest doorbell, multiple next hubs/google tvs, etc.. happy to provide more details.

Phone: Pixel 6 PRO

Home App Version: 3.2.1.7

Android Version 14  Build #: UPB3.230519.008

I'm not in public view but I have tried it that way, doesn't work either way. The only Nest devices I have are a display and a thermostat. Although it is a Nest Thermostat I am not using the Nest app. During installation I was instructed to only set it up in Home, so the Nest app is not even installed on my phone.

It's odd that I can use 'Home' on the app but not on the script editor.

I currently have a work around until I can use the script correctly. For now, I setup a Smart Action in my Kasa app that triggers when my carport light comes on. If this happens from Sunrise to Sunset, then my outside lights are turned immediately back off.

Please let me know if you get this resolved, thank you.

Phone: Moto G Power (2021)

Home App Version: 3.2.1.7

Android Version 11 Build # RZBS31.Q2-143-27-11-12

I also would be happy to provide additional details, anything you need.

 

Dan_A
Community Specialist
Community Specialist

Hi folks,

 

@JerryInTennesse, @V0idmain, that certainly isn’t the experience we want you to have. For questions about Google Assistant for Developers and Automation Script Editor, click the links below:

 

 

We specialize in Google Nest products. If you have Google Nest devices and would like assistance with them, let us know; otherwise, I'll be locking this thread after 24 hours.

 

We really appreciate your expertise, @Cathal_S!

 

Best regards,

Dan

Cathal_S
Gold Product Expert
Gold Product Expert

Hi @Dan_A

This new script editor is part of the Google Home web application that controls Google Home and Google Nest devices and this specific question is about users that don't have the ability to use the home/away assist feature.

 

Please don't close this forum thread!

 

 

Regards,
Cathal

Dnolan
Community Member

I’m having the same issue. Want to turn outside lights on when I arrive home and it’s after sunset and before sunrise. The home app shows my phone coming and going in the activity feed, but the lights never turn on when I arrive home. Same script as OP.

papaalk
Community Member

I have the same Issue. Was anyone able to make it work?