Display of weekday rules in schedule

Hi,
I really love the schedule UI for rules that are tagged as Schedule.

I have rules that have a condition to run the rule only on weekdays:
grafik
These rules get displayed on every day in the schedule UI.

Am I doing something wrong?

As well, I have rules that use the astro timer:
grafik
I assume that it would be not that easy to calculate when this events trigger.
Still it would be super nice to have this in the schedule :slight_smile:
Is there perhaps another way to achieve this?

Best regards,
John

As far as I know, there is not an API available for the UI to request the information necessary from Ephemeris or other bindings to put those on the calendar.

Theoretically but it;s going to involve dynamically created Rules. You would need to have a rule that runs that creates other rules using the appropriate time based trigger based on calls to Ephemeris for the “it is a weekday” or any of the other Ephemeris based conditionals. Tag those dynamically created Rules with “Schedule” and they will show up in the schedule.

The same would have to be done for the Astro triggers, only around midnight the trigger would have to come from a DateTime Item linked to the civilDusk#start Channel.

This is all theoretically possible. I’ve already written code much like this in Jython (see https://github.com/rkoshak/openhab-rules-tools/tree/main/rules_utils). I’ve not looked into it a whole lot yet for JSONDB JavaScript rules. I’ve gone far enough to show it’s possible but not far enough to make it work.

This is on my todo list to implement for my TimeOfDay implementation because it would be cool to see the time of day changes on the calendar.

Obviously, though, this is going to be a whole lot of work.

Hi Rich,

thanks for your reply.
But yes, this would probably be way too much effort (at least for me :slight_smile:) to achieve this.
As well, I’d like to keep my rules clean and simple :wink:

+1 on this request, this would be super useful also to verify if rules have been created correctly. Is there a GitHub issue I can follow which tracks this request?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.