Problem with system_event_log automation

Hi, I have a system_event_log automation which is not working:

- id: Restart_HA_on_Caldav_Error
  alias: Restart_HA_on_Caldav_Error
  initial_state: 'on'
  - platform: event
    event_type: system_log_event
  - condition: template
    value_template: '{{ "problem with path handling" in }}'
  - service: homeassistant.restart

This is the log file output:

2020-10-21 08:14:31 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up caldav platform for calendar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/", line 193, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.8/concurrent/futures/", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/caldav/", line 77, in setup_platform
    calendars = client.principal().calendars()
  File "/usr/local/lib/python3.8/site-packages/caldav/", line 417, in calendars
    return self.calendar_home_set.calendars()
  File "/usr/local/lib/python3.8/site-packages/caldav/", line 394, in calendar_home_set
    chs = self.get_properties([cdav.CalendarHomeSet()])
  File "/usr/local/lib/python3.8/site-packages/caldav/", line 232, in get_properties
    raise Exception("The CalDAV server you are using has "
Exception: The CalDAV server you are using has a problem with path handling.

Any hints why its not working as expected? :slight_smile:

Field Description
level Either WARNING or ERROR depending on severity.
source File that triggered the error, e.g., or media_player/
exception Full stack trace if available, an empty string otherwise.
message Descriptive message of the error, e.g., “Error handling request”.
timestamp Unix timestamp with as a double, e.g., 1517241010.237416.

My guess is you’re looking at ‘message’ instead of ‘exception’.

Your message is probably “Error while setting up caldav platform for calendar”

While exception would contain the rest.

So, try

1 Like

huh is it really so simple and my dumb mistake? will try that, thanks very much! :slight_smile: