How do you set up a rule to turn on a light 30 minutes before CivilDusk, say? I am moving over from HomeSeer, and this seems like it should be simple to do. Although it seems easy to do it at CivilDusk, I can’t figure out how to add an offset using either the UI or the “Code” window like I see in some OpenHAB 2 examples in code. Suggestions?
Set the START or END of the event trigger otherwise the rule will fire twice (START and END)
If you wanted to use the range event for civil dusk you just do the same as above but instead of sunset event range you use the civil dusk event range.
Thank you, Greg. I hadn’t understood the concept of the range event. I’ve configured it and expect it will work fine this evening.
One question: The offset appears to apply to the range event for any rules which use it. For instance, if I have two rules and I want one to fire 30 minutes before sunset and one to fire 15 minutes after sunset, I wouldn’t be able to do that, since there is only one range event from astro:sun:local. I don’t suppose it’s possible to create a second instance of asto:sun:local or something?
Yes, it is. call it notlocal, or plus30, or whatever.
You can apply offsets to the stuff you are interested in.
You can apply a different geographical location to shift every solar event.