Advanced rules in jython

Correct, but isn’t user configuration needed to choose the appropriate Astro event? Lots of options… I love it! I just wrapped the Jython addon and included the helper libraries… installs everything in one click! Hopefully, there will be even more people providing even more options!

Yes and No. If you have setup Lat. Long in openHAB system settings, then the value is read from there (unless antoher value is configured specifically). And Yes because you need to configure it in openHAB settings (if not done).

I was thinking more along the lines of configuring which Channel/event is used for sunset or sunrise. Civil, nautical, etc., everyone has their preferences.

Yes, but I’m not recommending that you adopt Time of Day or Mode. I’m recommending that your use it as an example for how you can do this without the Astro 1 Action. You will have to do it at some point anyway when the Astro Action goes away so why not do a little bit of work now to not become broken in the future? The fact that to use this one would need to have both the Astro 1 binding and Astro 2 binding installed, since 90% of us have long since moved to the Astro 2 binding, is a big draw back as well.

When you set your lat long and install the Astro 2 binding, an Astro Thing for that lat/long automatically get’s created and shows up in your inbox. So it’s not like users have to go out of their way to do a lot of complicated configuration. And most will have already installed and set up their Astro Thing anyway.

And I’ll second Scott’s comment, users will want to configure this anyway. For example, I live up against the mountains. The sun actually goes behind the mountains an hour or more before actual sunset. I need to account for that in any of my Rules that care. So when using a library like yours, I want that control.

That would definately be an option

I agree with you

I was thinking of an simple mode along with the option for advanced mode. The first option should be more or less to use what is already configured in system settings, without the need for mapping items in a config file. People like you and I off-course need the option to configure everything detail. For that I would make it possible to configure astro settings in the config. I have thought of supporting some keywords in my schedules, eg. like sunsetStart and maybe even with the option to add a time offset, omething like this: sunsetStart - 30m The latter means that the time is 30 minutes before the Astro event sunset start.

I completely agree that I need to find something else than Astro Action in the future.
So bottomline I guess we do agree .-)