Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rgb_patio_lights
- alias: Turn on patio lights when motion detected by camera
trigger:
platform: state
entity_id: camera.backyard
to: 'recording'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
service: light.turn_on
data:
rgb_color: [255,255,255]
brightness: 255
entity_id: light.2cf432f4a1bd_192_168_99_164
- alias: Turn off patio light 5 minutes after last movement
trigger:
platform: state
entity_id: camera.backyard
to: 'idle'
for:
minutes: 5
action:
service: light.turn_off
entity_id: light.2cf432f4a1bd_192_168_99_164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment