I have an automation that turns lights on and off after 2 min or after motion clears for 2 min. Works most of the time with no issue. However, occasionally, the lights will stay on indefinitely. Given it's in the garage, I don't always see it until hours later. I would appreciate any insights. Thank you
I am providing the yaml below:
id: '1730680757547'
alias: Garage - Main Lights On with motion or door opens
description: >-
Garage Main Light turns on with motion or when door opens, then turn off
after 2 minutes without motion.
triggers:
- type: opened
device_id: ba6affa2ae5303e3156af79b13cf6cdf
entity_id: f6e1b2988199dacedb59dd9392524bc3
domain: binary_sensor
trigger: device
id: Garage entry door opened
alias: When garage entry door opens - trigger: state
entity_id:- binary_sensor.garage_motion
to: 'on'
id: Garage motion detected
alias: 'Garage Motion Detected '
- binary_sensor.garage_motion
- device_id: 83a1ebf3a582832293ec8868f69029ca
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '001'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 001
trigger: device
value: 0
id: Manually pressed
alias: 'Light turned on manually '
conditions: - condition: numeric_state
entity_id: sensor.garage_motion_sensor_illuminance
below: 100
actions: