Home Assistant release with the issue:
0.92.1
Last working Home Assistant release (if known):
Unknown, first attempt
Operating environment (Hass.io/Docker/Windows/etc.):
Official docker image, current as of today
Component/platform:
Caldav
Description of problem:
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
calendar:
- platform: caldav
url: "https://p39-caldav.icloud.com/xxx/calenders/yyy"
username: "zzz"
password: "www (app specific)"
calendars:
- 'Calender Name'
Traceback (if applicable):
2019-05-01 17:34:22 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 55, in setup_platform
calendars = client.principal().calendars()
File "/usr/local/lib/python3.7/site-packages/caldav/objects.py", line 417, in calendars
return self.calendar_home_set.calendars()
File "/usr/local/lib/python3.7/site-packages/caldav/objects.py", line 396, in calendar_home_set
'{urn:ietf:params:xml:ns:caldav}calendar-home-set']
File "/usr/local/lib/python3.7/site-packages/caldav/objects.py", line 405, in calendar_home_set
if (sanitized_url.hostname and
AttributeError: 'NoneType' object has no attribute 'hostname'
Additional information:
curl -I https://p39-caldav.icloud.com/xxx/calenders/yyy, I get a 401 unauthorizedcurl -I -u zzz:www https://p39-caldav.icloud.com/xxx/calenders/yyy, I get a 200 okaySo it's likely that auth is working, it's crashing on whatever it loads from the calendar.
Hi,
please change your url setting to
url: https://caldav.icloud.com
and test again. The underlying component can detect your calendars.
The underlying component can detect your calendars.
Ooh, awesome! Works great now, thanks! 馃槃
@ReneNulschDE is it possible to validate the url better during config validation to avoid an issue like this?
@MartinHjelmare : Not sure how to check this. (Was my first visit of the underlying CalDav repo.) How about adding this note to the docs:
# Example configuration.yaml entry for icloud.com, calendars will be found automatically, to set-up the app specific password see https://support.apple.com/en-us/HT204397
calendar:
- platform: caldav
username: john.doe
password: !secret icloud_app_password
url: https://caldav.icloud.com
Works for me as well !! Awesome.
Tx a lot !!
ive added my settings to my config but no calendar shows up in the front end how do I get it to show the calendar in the gui?
Most helpful comment
Hi,
please change your url setting to
and test again. The underlying component can detect your calendars.