Caldav component

Were you able to show the sensor attributes? I can see the different Synology calendars but none of the attributes.

If there is an event, they will show

OK, makes sense.

I’m testing now but it seems like you have to reboot HASS for any changes to show. Is that something you’ve noticed?

I think the sensor won’t update every min/hour/… as it is a pull type sensor (i.e. the calendar cannot push events to homeassistant).

Do you get full day events working? This does not work with me…

I have my Synology Calendar in HA now many thanks… but I don’t see the events. Do they only show if they are on the day in question?

I can’t get the full day events to work either. I’m still playing around with it and have a few full day events setup for tomorrow to see what it looks like.

Won’t work - I went through the code. All day events are ignored unless you create a custom calendar with search functionality

I created a bug report (https://github.com/home-assistant/home-assistant/issues/20999)

1 Like

They only show up if there is an event happening right now (so only during the duration of an event)

I see, so it’s really just a way to trigger automations based on the entries in the calendar. I actually wanted to display the content of the calendar or specific entires, for example when the next waste collection is. I think I mis understood the meaning the the component :frowning:

Indeed, it is mostly for automations.

If you want to visualize stuff (waste collection, …), take a look at the Lovelace Google Calendar component.That will allow you to do exactly want you want.

Disclaimer: I’m the original developer of that card

Thanks looks good. Because I couldn’t get CalDav working previously I went for an Google Calendar and integrated it into my setup. I was hoping to could use CalDav to keep everything in house. Your lovelace card looks good and it DOES mention CalDav integration from HA, how it that working if the HA CalDav solution only shows sensors?

My current solution.

02%20pm

There is the sensor (which is only true when there is an event right now) but home-assistant also has a rest api which gives you the 5 next events from now. That’s what I use there.

1 Like

Sneaky :slight_smile:

Looks like this updates every 15 min and will display the events of that day. It currently does not show All Day events (which has a bug report) or the next event if it’s not today.

How did you fix this?

Hey folks,

therefore i just struggled with getting my Synology Diskstation calendar to work, i want to confirm what is working for me:

calendar:
  - platform: caldav
    username: mysecretuser
    password: mysecretpass
    url: https://<url>:5001/caldav.php/mysecretuser
    calendars:
      - 'Gemeinsam'
      - 'Abfallkalender'

Just note that it is only working with caldav.php (as mentioned before). In my case i also had to connect via https (+https-port).

Hope that helps :wink:

3 Likes

That’s awesome! It work!

Thanks for your help!

Is anyone having issues with the Caldav component? I had mine working for a long time and then recently I started getting an error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 40, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 136, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/calendar/__init__.py", line 193, in get
    request.app["hass"], start_date, end_date
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 141, in async_get_events
    return await self.data.async_get_events(hass, start_date, end_date)
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 173, in async_get_events
    vevent = event.instance.vevent
  File "/usr/local/lib/python3.7/site-packages/caldav/objects.py", line 995, in _get_vobject_instance
    self._vobject_instance = vobject.readOne(to_unicode(self._data))
  File "/usr/local/lib/python3.7/site-packages/vobject/base.py", line 1156, in readOne
    allowQP))
  File "/usr/local/lib/python3.7/site-packages/vobject/base.py", line 1101, in readComponents
    vline = textLineToContentLine(line, n)
  File "/usr/local/lib/python3.7/site-packages/vobject/base.py", line 925, in textLineToContentLine
    return ContentLine(*parseLine(text, n), **{'encoded': True,
  File "/usr/local/lib/python3.7/site-packages/vobject/base.py", line 813, in parseLine
    raise ParseError("Failed to parse line: {0!s}".format(line), lineNumber)

Does it still work for you? I cannot find proper URL it’s either refused or wrong.

This is what I’ve been using for a while now and it works

- platform: caldav
  username: !secret calendar_username
  password: !secret calendar_password
  url: https://URL/caldav.php/calendarname
1 Like