cancel
Showing results for 
Search instead for 
Did you mean: 

Turn lights on when unlocking the front door

Brandoaz
Community Member

I want to turn lights on when the door is opened. This doesn’t seem to be possible.

This seems to be because the policy isn’t written well. You should only care if the ACTION of the automation unlocks something as you could accidentally lower your safety. (This makes perfect sense!). You should be able to TRIGGER an action (starter) when the unlock has already manually occurred. 

Can you all file a bug to get this policy updated? This seems like a huge shortcoming in the routines.

 

 https://support.google.com/assistant/answer/7672035#zippy=%2Cwhy-a-starter-might-be-unavailable

1 REPLY 1

OpethNJ
Community Member

This is actually very easy to do leveraging Google Home Script Editor, Understanding you might not be aware of that it can be found here: home.google.com - left side menu - automations. 

Documentation can be found here: https://developers.home.google.com/codelabs/create-a-scripted-automation#6

 

Literally just took me 60 seconds to write a script that turns on lights when unlocking my front door. In this case I am using a Switchbot lock on my front door which upon unlocking it turns on a set of Govee lights in my apt.

 

metadata:
name: Turn on lights when unlocking door
description: unlcock front door and turn on lights
automations:
starters:
- type: device.state.LockUnlock
state: isLocked
is: false
device: SwitchBot Lock - Front Door
actions:
- type: device.command.OnOff
on: true
devices: GOV Glide Hex - Living Room