I have this automation to turn on my govee lights when any of my 4 motion sensor change to any state. It was working for a week then today it just stopped working. I confirmed the motion entities changed state but the automation did not fire. Nothing shows in the log. Here is the script for reference:
You’re using the same entities for the triggers and the Wait triggers while using restart mode… that won’t work. The Wait will never complete due to being triggered, because the automation will restart.
Then there’s the conundrum of using continue_on_timeout followed immediately by {{ wait.completed == false }}… so the continue_on_timeout will never do anything.
Why do you want to turn a light on when the sensor clears? Yes, you can remove the to: on but that defies the point of my code and will not work as well since you’ll end up with a 10 min delay before the lights turn off rather than a 5 min delay. Try it my way and see what I mean, it will work well.
Because the motion sensors I have flip flop state. They never clear. When it first sees motion it goes from 0 to 1. It stays that way till the next motion event and it goes from 1 to 0. Maybe I can fix this in the motion software.
They are the same. They are custom sensors I made using letsconrolit or espeasy. Basically I took a long range Guardline IR and implanted a esp8266 coupled with opto couplers. They connect via mqtt.