{"record":{"id":"e231640ba26c4194","repo":"home-assistant/core","slug":"caldav-save-error-err","errorCode":null,"errorMessage":"CalDAV save error: {err}","messagePattern":"CalDAV save error: (.+?)","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/caldav/calendar.py","lineNumber":244,"sourceCode":"            \"summary\": kwargs[\"summary\"],\n            \"dtstart\": kwargs[\"dtstart\"],\n            \"dtend\": kwargs[\"dtend\"],\n        }\n        if description := kwargs.get(\"description\"):\n            item_data[\"description\"] = description\n        if location := kwargs.get(\"location\"):\n            item_data[\"location\"] = location\n        if rrule := kwargs.get(\"rrule\"):\n            item_data[\"rrule\"] = rrule\n\n        _LOGGER.debug(\"ICS data %s\", item_data)\n\n        try:\n            await self.hass.async_add_executor_job(\n                partial(self.coordinator.calendar.add_event, **item_data),\n            )\n        except (requests.ConnectionError, requests.Timeout, DAVError) as err:\n            raise HomeAssistantError(f\"CalDAV save error: {err}\") from err\n\n    @callback\n    @override\n    def _handle_coordinator_update(self) -> None:\n        \"\"\"Update event data.\"\"\"\n        self._event = self.coordinator.data\n        if self._supports_offset:\n            self._attr_extra_state_attributes = {\n                \"offset_reached\": is_offset_reached(\n                    self._event.start_datetime_local,\n                    self.coordinator.offset,  # type: ignore[arg-type]\n                )\n                if self._event\n                else False\n            }\n        super()._handle_coordinator_update()\n\n    @override","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/caldav/calendar.py#L226-L262","documentation":"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.","triggerScenarios":"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.","commonSituations":"Server temporarily down when a user creates an event, network blips, or servers rejecting the generated ICS payload (bad rrule, unsupported properties).","solutions":["Verify CalDAV server connectivity and credentials (the same server works for reads)","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","Retry the service call once connectivity is restored"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await hass.async_add_executor_job(partial(calendar.add_event, **item_data))\nexcept (requests.ConnectionError, requests.Timeout, DAVError) as err:\n    raise HomeAssistantError(f\"CalDAV save error: {err}\") from err","preventionTips":["Check server reachability before scheduling event-creating automations","Log the ICS payload (debug already present) to identify rejected properties","Wrap service calls in automations with retry/until conditions for transient failures"],"tags":["homeassistant","caldav","calendar","service-call"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}