I wrote two automations that would turn on my porch light whenever my Ring detected motion or my front door opened at night, then turn off 1 minute after the door was closed and motion had stopped being detected. It seems to be working for the turn-on automation, but I frequently find the light still on. Anyone able to help me troubleshoot this?
- alias: Entryway Auto On
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_motion
to: 'on'
from: 'off'
- platform: state
entity_id: binary_sensor.front_door_opened
to: 'on'
from: 'off'
condition:
condition: state
entity_id: sun.sun
state: below_horizon
action:
- service: light.turn_on
entity_id: light.entryway
- alias: Entryway Auto Off
initial_state: true
trigger:
- platform: time
minutes: '/1'
seconds: 00
condition:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.front_door_opened
state: 'off'
- condition: state
entity_id: binary_sensor.ring_front_door_motion
state: 'off'
action:
- service: light.turn_off
entity_id: light.entryway