benleb / ad-automoli

💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features
https://github.com/benleb/ad-automoli
MIT License
110 stars 29 forks source link

Fix issue where light doesn't turn off after crossing light threshold #108

Open cengel74 opened 2 years ago

cengel74 commented 2 years ago

If the room is configured to use the illuminance threshold and the light is currently on when the threshold is crossed it will never get turned off unless it naturally turns off due to lack of motion, etc.

This adds a check in the motion_event to exit without refreshing the timer