core: CalDav: Repeat events do not show in all views

The problem

Repeat calendar events do not show beyond the first entry in Monthly and Weekly views. They do, however, render as expected in Daily view. Seems to happen with CalDav but not Google Calendar entries. Might be specific to iCloud calendars, not sure, don’t have another CalDav compatible calendar to test with.

Environment

  • Home Assistant Core release with the issue: 0.114.4
  • Last working Home Assistant Core release (if known): Unknown
  • Operating environment (OS/Container/Supervised/Core): Home Assistant OS
  • Integration causing this issue: CalDav
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/caldav/

Problem-relevant configuration.yaml

calendar:
  - platform: caldav
    username: !secret icloud_username
    password: !secret icloud_app_password
    url: https://caldav.icloud.com
    calendars:
      - Family
      - Errands

Traceback/Error logs

N/A


Additional information

In the monthly and weekly view you can see only a single event (the first one). But moving forward to the 17th (or any day beyond the first one) you can see the repeat events.

monthly weekly daily

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 76 (21 by maintainers)

Commits related to this issue

Most upvoted comments

Issue not solved.

Have the same issue with Caldav Nextcloud calendar with recurring events.

Not stale…

Just updated to 2023.2 and it’s working perfectly for me.

I’m the de-facto maintainer of the python caldav library, which is used by the caldav integration.

The python caldav library depends on the server to do expansion of repeating events - unfortunately not all servers supports this. I haven’t read all the activity above - but I expect it to correspond with this list:

  • Xandikos - reportedly, expansion should work on newer versions, but I haven’t been able to get the tests to pass.
  • Radikale - does not work, ref https://github.com/Kozea/Radicale/issues/662
  • Zimbra - while quite a lot of things break in their caldav support, expansion actually works
  • Bedework - expansion not working
  • Baikal - expansion of events work (but not for tasks)
  • iCloud - expansion works (but quite some other things break - caldav is not officially supported)
  • DAViCal - expansion works
  • Google - expansion does not work
  • SOGo - expansion does not work
  • Nextcloud - expansion works (but not for tasks)
  • Fastmail - expansion works

There is a plan to support expansion client-side, but hard to say when I will get time to fix that.

Might be specific to iCloud calendars, not sure, don’t have another CalDav compatible calendar to test with.

I have the same problem with the Radicale CalDAV server.

In addition to the Calendar view it also happens in the custom calendar card

I realized it was because the response needed to contain timezone information https://github.com/home-assistant/core/issues/81624#issuecomment-1367224721

Anyway, i tested your patch with nextcloud and it definitely works for recurring events. I encourage you to go forward with your bump of the caldav library!

Thanks to the huge help from @tobixen we now have client-side expansion in python-caldav! I’ve already started implementing its use in my own fork: I will submit a PR eventually, after the official release of python-caldav and thorough testing.

I’m saying I fixed Google calendar for everyone. If you see issues with recurring events in Google calendar, then file an issue on the Google calendar integration.

(There is a parameter home assistant passes to the Google calendar API that gets it to expand recurring events)

Here is the corresponding issue for the caldav library: https://github.com/python-caldav/caldav/issues/157

It does look like a multi day repeating event only fires on the first day, i.e. if I have M-F repeating starting on October 1, it only fired on October 1.

If I have a single day repeating event, i.e. every Saturday or another on every sunday, these events fire weekly with no issue.

Also, if I edit a single event, and break it from the series, that fires.