home-assistant/core · error · HomeAssistantError

CalDAV save error: {err}

Error message

CalDAV save error: {err}

What it means

HomeAssistantError raised from the calendar entity's async_create_event when the caldav add_event call fails with requests.ConnectionError, requests.Timeout, or DAVError. This surfaces to the UI/service caller as an error creating the calendar event.

Source

Thrown at homeassistant/components/caldav/calendar.py:244

            "summary": kwargs["summary"],
            "dtstart": kwargs["dtstart"],
            "dtend": kwargs["dtend"],
        }
        if description := kwargs.get("description"):
            item_data["description"] = description
        if location := kwargs.get("location"):
            item_data["location"] = location
        if rrule := kwargs.get("rrule"):
            item_data["rrule"] = rrule

        _LOGGER.debug("ICS data %s", item_data)

        try:
            await self.hass.async_add_executor_job(
                partial(self.coordinator.calendar.add_event, **item_data),
            )
        except (requests.ConnectionError, requests.Timeout, DAVError) as err:
            raise HomeAssistantError(f"CalDAV save error: {err}") from err

    @callback
    @override
    def _handle_coordinator_update(self) -> None:
        """Update event data."""
        self._event = self.coordinator.data
        if self._supports_offset:
            self._attr_extra_state_attributes = {
                "offset_reached": is_offset_reached(
                    self._event.start_datetime_local,
                    self.coordinator.offset,  # type: ignore[arg-type]
                )
                if self._event
                else False
            }
        super()._handle_coordinator_update()

    @override

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Verify CalDAV server connectivity and credentials (the same server works for reads)
  2. Check the debug log line 'ICS data' to inspect the generated payload; simplify the event (drop rrule/recurrence) to see if the server rejects a specific property
  3. Retry the service call once connectivity is restored
Defensive patterns

Strategy: try-catch

Try / catch

try:
    await hass.async_add_executor_job(partial(calendar.add_event, **item_data))
except (requests.ConnectionError, requests.Timeout, DAVError) as err:
    raise HomeAssistantError(f"CalDAV save error: {err}") from err

Prevention

When it happens

Trigger: Calling the calendar.create_event service (or the entity's async_create_event) while the server is unreachable, times out, or returns a bad DAV response for the new-event PUT.

Common situations: Server temporarily down when a user creates an event, network blips, or servers rejecting the generated ICS payload (bad rrule, unsupported properties).

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/e231640ba26c4194. Report an issue: GitHub.