My Day mode is set at sunrise. I want to use sunrise in a Rule as the trigger.
If I have a Rule that is triggered by sunrise, can I then immediately test if the mode is Day? That is, is the mode set to day effectively instantly at sunrise, so that I can use the logic, below? Or, do I need to have the trigger something like sunrise+1 to allow time for the mode to change to day?
Trigger:
Sunrise:
Action:
If mode = day then xxxxxx
If you trigger the rule with mode day, the rule could run again during the day if for example the mode changed to day after being away.
In my opinion the best approach if you want it to run only once like that, would be to replace your
"If Mode = day then" for a "wait for condition" .
What's nice about wait for condition is that if its already true when it starts, it will continue with the rule. That way the delay for the mode to change to day won't matter.
So just do Wait for condition - mode = day, and keep the trigger as sunrise.
I didn't think I could use Mode as a trigger as I thought that mode was a "state" rather than a trigger. But now I see that when using mode as a trigger, it is actually "mode becomes day", which is a trigger. That works great for my application.