09-22-2023 04:39 AM
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!
Answered! Go to the Recommended Answer.
09-25-2023 01:54 PM
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 ?
09-25-2023 01:54 PM
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 ?
09-26-2023 02:09 AM
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
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
10-11-2023 07:20 AM