How to trigger and run just once a day
Posted: Saturday 18 April 2020 23:05
Hello people. The attached Blockly runs if it gets dark earlier than Sunset, using a Lux sensor as a trigger. Everything works fine, except the detection mechanism is a little hit-and-miss.
If the light level decays rapidly, it may never detect that window.
But if it decays slowly, the script may run multiple times, as it does if the window is set too wide.
It just needs to run once when the Lux falls below a set level sometime before Sunset.
I thought of setting a User Variable, and triggering off of that, but wondered if there isn't a neater way to do this.
TIA for any suggestions.
If the light level decays rapidly, it may never detect that window.
But if it decays slowly, the script may run multiple times, as it does if the window is set too wide.
It just needs to run once when the Lux falls below a set level sometime before Sunset.
I thought of setting a User Variable, and triggering off of that, but wondered if there isn't a neater way to do this.
TIA for any suggestions.