[iCalendar] eventfilter returns UNDEF for multiday event

Hi, I’m having a problem with an event filter. I’ve tried to find the answer so I hope I’m not being stupid :slight_smile: I want to find if today is in a multiday event based on the summary being “Holiday”. Here is an example of a multiday event from my ics file:

BEGIN:VEVENT
DTSTART;VALUE=DATE:20210401
DTEND;VALUE=DATE:20210419
DTSTAMP:20210408T195523Z
UID:XXXX@google.com
CREATED:20190902T163109Z
DESCRIPTION:
LAST-MODIFIED:20210408T194741Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Holiday
TRANSP:TRANSPARENT
END:VEVENT

and my event filter is configured like this:

UID: icalendar:eventfilter:b57749735f:b09418753f
label: On Holiday
thingTypeUID: icalendar:eventfilter
configuration:
  maxEvents: 1
  textValueType: TEXT
  datetimeEnd: 1
  refreshTime: 15
  datetimeStart: 0
  textEventValue: Holiday
  textEventField: SUMMARY
  datetimeRound: true
  datetimeUnit: DAY
bridgeUID: icalendar:calendar:b57749735f

Even though today is in the middle of the multiday event in the ics file the event filter returns UNDEF. If I change the multiday event to start today then it returns the event fine. Is there any way of getting the event filter to return the event for any of the days it covers?

The eventfilter is only able to filter events by beginning and your filter just shows events starting today. So your use case is not possible using filters. But without filters, the icalendar-bridge shows whether an item is present or not (as it searches events differently).

1 Like