{"record":{"id":"787961196358b000","repo":"home-assistant/core","slug":"failed-connecting-to-the-websocket","errorCode":null,"errorMessage":"Failed connecting to the websocket.","messagePattern":"Failed connecting to the websocket\\.","errorType":"exception","errorClass":"ConfigEntryNotReady","httpStatus":null,"severity":"error","filePath":"homeassistant/components/anova/__init__.py","lineNumber":50,"sourceCode":"    )\n    try:\n        await api.authenticate()\n    except InvalidLogin as err:\n        _LOGGER.error(\n            \"Login was incorrect - please log back in through the config flow. %s\", err\n        )\n        return False\n    assert api.jwt\n    try:\n        await api.create_websocket()\n    except NoDevicesFound as err:\n        # Can later setup successfully and spawn a repair.\n        raise ConfigEntryNotReady(\n            \"No devices were found on the websocket, perhaps you\"\n            \" don't have any devices on this account?\"\n        ) from err\n    except WebsocketFailure as err:\n        raise ConfigEntryNotReady(\"Failed connecting to the websocket.\") from err\n    # Create a coordinator per device, if the device is offline, no data will be on the\n    # websocket, and the coordinator should auto mark as unavailable. But as long as\n    # the websocket successfully connected, config entry should setup.\n    devices: list[APCWifiDevice] = []\n    if TYPE_CHECKING:\n        # api.websocket_handler can't be None after successfully creating the\n        # websocket client\n        assert api.websocket_handler is not None\n    devices = list(api.websocket_handler.devices.values())\n    coordinators = [AnovaCoordinator(hass, entry, device) for device in devices]\n    entry.runtime_data = AnovaData(api_jwt=api.jwt, coordinators=coordinators, api=api)\n    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)\n    return True\n\n\nasync def async_unload_entry(hass: HomeAssistant, entry: AnovaConfigEntry) -> bool:\n    \"\"\"Unload a config entry.\"\"\"\n    if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/anova/__init__.py#L32-L68","documentation":"Raised as a ConfigEntryNotReady when api.create_websocket() throws WebsocketFailure from the anova-cloud library. This means the WebSocket connection to Anova's cloud service could not be established or failed during setup. Because it is a ConfigEntryNotReady, Home Assistant marks the entry as setup-retrying and backs off exponentially rather than failing permanently.","triggerScenarios":"await api.create_websocket() failing at the transport level: Anova cloud endpoint unreachable, network/DNS problems, firewall blocking WebSocket upgrade (wss), expired or invalid JWT causing the server to reject the socket, or an anova-cloud library outage/bug.","commonSituations":"Transient Anova cloud downtime, local internet outage, reverse proxy or firewall stripping WebSocket upgrade headers, or a stale token after a password change on the Anova account.","solutions":["Check network connectivity to Anovo cloud and confirm wss traffic is allowed (no proxy blocking WebSocket upgrades)","Check Anova service status / community forums for a cloud outage; the entry will retry automatically","If persistent, delete and re-run the config flow to re-authenticate and obtain a fresh JWT"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await api.create_websocket()\nexcept WebsocketFailure as err:\n    raise ConfigEntryNotReady(\"Failed connecting to the websocket.\") from err","preventionTips":["Ensure wss:// egress to Anova cloud is permitted by firewalls/proxies","Treat as transient: let HA's ConfigEntryNotReady backoff retry rather than reconfiguring immediately"],"tags":["home-assistant","anova","websocket","network","retry"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}