04-02-2025 06:25 AM
Hello, I'm brand new to the automation script editor and have tried writing a script for this scenario:
When the back door is opened after dark the garden lights come on and stay on for ten minutes.
Sounds like a simple enough task to me but I've tried two different variations, both with no errors, but cannot get it to work. I've got a Philips Hue Contact Sensor and Hue outdoor lighting, all independently working fine with Google home. In theory (or at least in my head) the scripts should work and I'm not sure what to try next. Any help would be greatly appreciated!
04-02-2025 06:29 AM
Latest script minus 'staying on for 10 minutes'
metadata:
name: Bifold Door
description: When door opens garden lights turn on and stay on for ten minutes, only during the evening when it's dark
automations:
starters:
- type: device.state.OpenClose
state: openPercent
is: 100
device: Bifold - Back Garden
condition:
type: time.between
before: sunrise
after: sunset
actions:
- type: device.command.OnOff
on: true
devices: Garden Wall 1 - Back Garden
- type: device.command.OnOff on or off.
on: true
devices: Garden Wall 2 - Back Garden
- type: device.command.OnOff
on: true
devices: Garden Wall 3 - Back Garden
- type: device.command.OnOff
on: true
devices: Garden Wall 4 - Back Garden
04-06-2025 10:37 AM
Hi Bojobo,
Thanks for reaching out to our community.
I'm sorry you can't set up your automation command to turn on the garden lights for ten minutes when the back door opens. It’s my pleasure to assist you with this concern.Based on the information you provided me, I recommend you go to the Google Developer Center, where you can find the Google Automations Script Editor to customize your automation.
If you need further assistance with your Google Nest products, please feel free to contact us whenever you need it.
Best regards,
Virna.