I’m trying to get my iCloud calendar integrated with the CalDav component.
I have created an app password for iCloud because I have 2FA enabled.
I’ve used this method to get the caldav url:
The config I used is:
calendar:
- platform: caldav
username: !secret icloud_login
password: !secret icloud_password
url: !secret icloud_url
calendars:
- "Family"
When I apply this config I’m getting errors. When I try whitout “calendars”, I’m getting errors.
Is there someone that can put me in the right direction?
The errors:
2019-04-20 07:52:45 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up platform caldav
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/caldav/calendar.py”, line 62, in setup_platform
calendars = client.principal().calendars()
File “/usr/local/lib/python3.7/site-packages/caldav/objects.py”, line 354, in calendars
return self.calendar_home_set.calendars()
File “/usr/local/lib/python3.7/site-packages/caldav/objects.py”, line 336, in calendar_home_set
self.calendar_home_set = chs[’{urn:ietf:params:xml:ns:caldav}calendar-home-set’]
File “/usr/local/lib/python3.7/site-packages/caldav/objects.py”, line 345, in calendar_home_set
if sanitized_url.hostname and sanitized_url.hostname != self.client.url.hostname:
AttributeError: ‘NoneType’ object has no attribute ‘hostname’
And:
2019-04-20 07:35:30 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up platform caldav
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/caldav/calendar.py”, line 62, in setup_platform
calendars = client.principal().calendars()
File “/usr/local/lib/python3.7/site-packages/caldav/davclient.py”, line 113, in principal
return Principal(self)
File “/usr/local/lib/python3.7/site-packages/caldav/objects.py”, line 316, in init
cup = self.get_properties([dav.CurrentUserPrincipal()])
File “/usr/local/lib/python3.7/site-packages/caldav/objects.py”, line 183, in get_properties
properties = self._handle_prop_response(response, props)
File “/usr/local/lib/python3.7/site-packages/caldav/objects.py”, line 147, in _handle_prop_response
if not ’ 200 ’ in status.text and not ’ 207 ’ in status.text and not ’ 404 ’ in status.text:
AttributeError: ‘NoneType’ object has no attribute ‘text’