home-assistant/core · warning · ConfigEntryNotReady
Connection error from CalDAV server
Error message
Connection error from CalDAV server
What it means
ConfigEntryNotReady raised when client.principal() raises requests.ConnectionError — TCP-level failure to connect to the CalDAV URL (DNS failure, refused connection, unreachable host). HA schedules a retry with backoff.
Source
Thrown at homeassistant/components/caldav/__init__.py:51
entry.data[CONF_URL],
username=entry.data[CONF_USERNAME],
password=entry.data[CONF_PASSWORD],
ssl_verify_cert=entry.data[CONF_VERIFY_SSL],
timeout=TIMEOUT,
)
try:
await hass.async_add_executor_job(client.principal)
except AuthorizationError as err:
if err.reason == "Unauthorized":
raise ConfigEntryAuthFailed("Credentials error from CalDAV server") from err
# AuthorizationError can be raised if the url is incorrect or
# on some other unexpected server response.
_LOGGER.warning("Unexpected CalDAV server response: %s", err)
return False
except requests.Timeout as err:
raise ConfigEntryNotReady("Timeout connecting to CalDAV server") from err
except requests.ConnectionError as err:
raise ConfigEntryNotReady("Connection error from CalDAV server") from err
except DAVError as err:
raise ConfigEntryNotReady("CalDAV client error") from err
entry.runtime_data = client
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload a config entry."""
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Confirm the URL and port from the browser/curl on the same host running Home Assistant
- Fix DNS or use an IP/resolvable name; ensure the CalDAV service is running
- If using https, verify the certificate is trusted (see CONF_VERIFY_SSL setting in the entry)
- Let the retry backoff re-run setup once the server is back
Defensive patterns
Strategy: try-catch
Validate before calling
import socket
from urllib.parse import urlparse
u = urlparse(url)
try:
socket.create_connection((u.hostname, u.port or 443), timeout=5).close()
reachable = True
except OSError:
reachable = False Try / catch
except requests.ConnectionError as err:
raise ConfigEntryNotReady("Connection error from CalDAV server") from err Prevention
- Double-check URL/port/protocol in the config entry
- Verify DNS resolves on the HA host, not just on a workstation
- Reserve a static IP or DNS name for the CalDAV server
When it happens
Trigger: The configured URL cannot be connected to at all: wrong hostname, wrong port, server down, DNS resolution failure, or TLS handshake rejected before HTTP happens.
Common situations: Typo in the URL, server offline at HA startup, local DNS not resolving the CalDAV host, or the port/protocol (http vs https) mismatching the listener.
Related errors
- Timeout connecting to CalDAV server
- Credentials error from CalDAV server
- CalDAV client error
- CalDAV lookup error: {err}
- CalDAV delete error: {err}
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/01dd5520d6542fdb.
Report an issue: GitHub.