cancel
Showing results for 
Search instead for 
Did you mean: 

Google Home for web - Issues with an automation I wrote

DDP1986
Community Member

Hello everyone,

a few days ago I wrote a simple automation via Google Home for Web. The purpose is for a smart bulb in the living room to turn on at sunset if I'm at home (or if the camera detect a person or if the tv is on). 

I validated the automation successfully but, as I close the Script Editor with the "Activate" on, the automation is not active. I then try to turn on the relative automation in the Automation page in Google Home for Web by clicking on the "Play" button, the message "Starting the routine" pops up, the "Play" button becomes a "Tick" to show that is activated, but it goes back to "Play" button after a few seconds.

Finally, the automation I wrote is not showing anywhere in the Google Home app on my phone.

Could you please help me out? I don't understand what's the issue.

Thank you so much!

 

 

1 Recommended Answer

sipriyadarshi
Solutions Expert
Solutions Expert

Hello @DDP1986 

Can you please share the script editor (metadata) which you are using for your routine ? Also, can you provide a video recording of the process along with the necessary screenshots ? 

View Recommended Answer in original post

3 REPLIES 3

sipriyadarshi
Solutions Expert
Solutions Expert

Hello @DDP1986 

Can you please share the script editor (metadata) which you are using for your routine ? Also, can you provide a video recording of the process along with the necessary screenshots ? 

DDP1986
Community Member

Hello sipriyadarshi,

see below the metadata for the routine and attached the various screenshots. Couldn't find a way to upload a video recording of the process in this thread though. 

One last note: if I'm removing the "home.state.homepresence" starter (due to the warning), the routing presents the same issues (not starting at all).

Thanks for the help!

Diego

Warning message when saving routineWarning message when saving routineDetailed message on the warning (I've added two other starters to have some redundancies)Detailed message on the warning (I've added two other starters to have some redundancies)After I close the script editor (and leaving the "Activate" on), it brings me back to the Automations spash page, but the routine is not ONAfter I close the script editor (and leaving the "Activate" on), it brings me back to the Automations spash page, but the routine is not ONActivation message when I click on the "Play" button of the routineActivation message when I click on the "Play" button of the routineAfter a few moments and with no other message, it deactivates itselfAfter a few moments and with no other message, it deactivates itself

metadata:
name: Living Room light after sunset # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
description: When home, turns on living room light at sunset # 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” and “actions” are required; “conditions” are optional.
# Use Ctrl + Space to see autocomplete suggestions.

# ---- STARTERS ---- #
# Starters describe events that will start the automation.
# To add more than one starter, duplicate the "- type" section under "starters".
# If you add multiple starter events, any one of them happening will start the automation.
starters:
- type: device.state.OnOff
state: on
# [available operators: is, isNot]
is: true
device: Sonos TV Control Living Room - Living Room
- type: device.event.PersonDetection # A person has been detected by the camera.
device: Living Room camera - Living Room
- type: home.state.HomePresence
state: homePresenceMode
# [available operators: is, isNot]
is: HOME
# ---- CONDITIONS ---- #
# Conditions are optional. Delete this section if it’s empty.
# Conditions will prevent an automation from starting if the conditions aren’t met.
# See g.co/home/script-editor-docs for documentation about how to use logical operators like “and”, “or”, and “not”.
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
# Optional. Days of the week to apply condition on.

# ---- ACTIONS ---- #
# Actions will start when a starter event takes place and all conditions are met.
# Actions will start in the order they appear in the script and with any delay specified.
# To add more than one action, duplicate the "- type" section under "actions".
actions:
- type: device.command.OnOff # Turn the device on or off.
on: true
devices: Smart Bulb Living Room - Living Room

DDP1986
Community Member

Dear @sipriyadarshi,

Any news on this? Were you able to identify the issue?

Thanks again!