iCalendar Binding triggering time offset

Hi there! I’ve just started to use the iCalendar Binding to retrieve ICS data from a Google Calendar and i use the current_presence channel of the calendar bridge to set a switch item on/off whenever there’s an active event in that calendar. No need for filtering in this case. That works great.

However I plan to implement an OpenHAB Switch item that reflects the occurrence of events in a different calendar. It’s a Google Calendar for a work schedule. Now, the tricky part comes when I want to do something before the event is actually scheduled. Let’s say I’d like to start up an engine heater 40 minutes before my work is scheduled in my calendar. And then I’d like to brew me a cup of coffee at a different offset, let’s say 20 minutes before the event is scheduled. This must be a very common use case. Of course I could solve it by setting up 3 different calendars but it would be much better solution if I could put a time offset (e.g. something like -nn minutes) on an iCalendar bridge.

Any ideas how to solve this?

Hi @RRoe,

Currently this behaviour is not implemented in the public code. But code already exists in preparation. Please test the pre-build linked there:

This is no PR as i currently don‘t have regular access to a machine that is able to build, test the addon and executing the ide. But a replacement is ordered. Until then, as much feedback as possible is nice, especially as i did not test the usecase in the wild up to now (in my synthetic test it worked). Please comment in the issue to keep everything together.

1 Like