{"record":{"id":"11979592ae922396","repo":"home-assistant/core","slug":"address-ex","errorCode":null,"errorMessage":"{address}: {ex}","messagePattern":"\\{address\\}: \\{ex\\}","errorType":"exception","errorClass":"ConfigEntryNotReady","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/apple_tv/__init__.py","lineNumber":102,"sourceCode":"    async_setup_services(hass)\n    return True\n\n\nasync def async_setup_entry(hass: HomeAssistant, entry: AppleTvConfigEntry) -> bool:\n    \"\"\"Set up a config entry for Apple TV.\"\"\"\n    manager = AppleTVManager(hass, entry)\n\n    if manager.is_on:\n        address = entry.data[CONF_ADDRESS]\n\n        try:\n            await manager.async_first_connect()\n        except AUTH_EXCEPTIONS as ex:\n            raise ConfigEntryAuthFailed(\n                f\"{address}: Authentication failed, try reconfiguring device: {ex}\"\n            ) from ex\n        except CONNECTION_TIMEOUT_EXCEPTIONS as ex:\n            raise ConfigEntryNotReady(f\"{address}: {ex}\") from ex\n        except DEVICE_EXCEPTIONS as ex:\n            _LOGGER.debug(\n                \"Error setting up apple_tv at %s: %s\", address, ex, exc_info=ex\n            )\n            raise ConfigEntryNotReady(f\"{address}: {ex}\") from ex\n\n    entry.runtime_data = manager\n\n    async def on_hass_stop(event: Event) -> None:\n        \"\"\"Stop push updates when hass stops.\"\"\"\n        await manager.disconnect()\n\n    entry.async_on_unload(\n        hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)\n    )\n    entry.async_on_unload(manager.disconnect)\n\n    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/apple_tv/__init__.py#L84-L120","documentation":"ConfigEntryNotReady raised during apple_tv setup when the first connection times out (CONNECTION_TIMEOUT_EXCEPTIONS from pyatv). HA marks the entry as setup-failed-but-retryable and backs off exponentially; the integration will try again automatically rather than requiring user action.","triggerScenarios":"manager.async_first_connect() raising pyatv connection timeout exceptions: device asleep/powered off, network slow or lossy, Apple TV on a different subnet/VLAN that drops mDNS or the protocol ports, or device temporarily unreachable during setup.","commonSituations":"Apple TV in deep sleep when HA restarts; Wi-Fi roaming or mesh backhaul instability; IGMP/mDNS filtering on managed switches; device rebooting during an HA upgrade.","solutions":["Wake the Apple TV (send any Remote command or wake it physically) and reload the integration","Check network path: same VLAN preferred, ensure ports 3689 (MAP), 49152+/3200 (AirPlay/RAOP) and mDNS (5353) are not blocked","Verify reachability with 'atvremote --scan' from the HA host, then reload the entry"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure the Apple TV is awake (disable deep sleep where possible) before HA restarts","Keep HA and the TV on the same subnet with mDNS unblocked","Rely on HA's built-in backoff; avoid manual reload spam"],"tags":["home-assistant","apple-tv","network","timeout","retry"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}