Long story short, I am using the Smart Lighting app to turn OFF and ON a light in my Garage Based on motion. The light comes on without any issues, however when motion STOPs, the light switch is not turned off.
It’s a automation that I have set to do the following:
Control: Garage Light Switch
What to do: Turn ON.
Trigger: Motion
Sensor: Garage Sensor
Turn on when: Motion Starts
Turn off after motion stops: yes
After this number of minutes: 5
More Option
Only if switch: Garage Light Switch is OFF
I have done a simple event logging of the two devices for troubleshooting purposes and as depicted, the light is being turned on, but not off consistently even if motion stops. As an example, this morning it turned on at 5:54:07, went inactive at 5:54:43 and never turned off at 05:59:43 as it was supposed to. The 7:19:38 looks to be a manual turn off.
It is not turning off because of the condition added “Only if switch: Garage Light Switch is OFF”. The condition is not only valid for trigger but later too - ‘5 minutes after motion stopped’ and then the switch is off too, which is not the case. Remove this condition and it will work.
To achieve what you intend, that is differentiating between manually turned on switch and automation, make a webcore piston with variables (google to see examples)
Not true. I use that exact same condition and mine works consistently. Like the OP, I don’t want the light to turn off if I manually turn it on. The automation only checks the condition before it runs, but once it runs, it will go to completion without checking the condition again. Now I’m not sure what the OP’s issue is as it looks correct.