I have a device on my roof which tells me how much light is outside. I want to combine this with a trigger for when the sun goes down, to turn on my outdoor lights.
The idea is that i have say a trigger of 2 hours before sunset, the light outside should turn on, but only when the light level outside goes below 10…
If i create an automation with the trigger for sunset and -02:00:00 in offset, along with a condition that the outside lightlevel must be below 10, the light is never turned on, because the condition isn’t met at 2 hours before sunset.
How can i make the automation be triggered, by the 2 hours before sunset, but wait untill the light level gets below 10, if it is not ?
Add a fixed delay before the next step. Delay an action until a specific timestamp. Delay an action until a specific event occurs. You can use a trigger from the Microsoft Dataverse connector or any other connector as a step in the middle of the flow to delay subsequent steps until a specific event occurs.
Did you end up using the code you posted above? I’m looking to do a similar thing. Trigger based on a temperature. The first time performs the actions but also starts a timer helper. Then next time it is triggered, if the timer helper is active, it will wait for it to expire before running the actions again and restarting the timer.
I think I could adapt your solution, but would be interested if it works and if you found a simpler solution.