Hey peeps,
I got a sonoff basic with a gpio14 wall switch. (to leave the light permanently on)
Plus a camera outside which triggers the light on motion.
I have an automation to turn off the light if no motion after 15 seconds. i want that automation not to trigger if the wall switch was manually turned on or if thats not possible than if the first automation was not triggered.
the automation i have is:
- alias: Turn on Backyard light when there is movement
trigger:
- platform: state
entity_id: binary_sensor.BakCam_motion
to: 'on'
condition:
condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
- condition: state
entity_id: light.backyard_light
state: 'off'
action:
service: light.turn_on
entity_id: light.backyard_light
- alias: Turn off Backyard light 15 Seconds after last movement
trigger:
- platform: state
entity_id: binary_sensor.BakCam_motion
to: 'off'
for:
seconds: 15
condition:
condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
action:
service: light.turn_off
entity_id: light.backyard_light
cheers