{"record":{"id":"0a98d2756ac059a1","repo":"home-assistant/core","slug":"connection-failed-during-firmware-update","errorCode":null,"errorMessage":"Connection failed during firmware update","messagePattern":"Connection failed during firmware update","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/airos/update.py","lineNumber":100,"sourceCode":"    async def async_install(\n        self,\n        version: str | None,\n        backup: bool,\n        **kwargs: Any,\n    ) -> None:\n        \"\"\"Handle the firmware update installation.\"\"\"\n        _LOGGER.debug(\"Starting firmware update\")\n        try:\n            await self.status.airos_device.login()\n            await self.status.airos_device.download()\n            await self.status.airos_device.install()\n        except AirOSConnectionAuthenticationError as err:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"update_connection_authentication_error\",\n            ) from err\n        except AirOSException as err:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"update_error\",\n            ) from err\n","sourceCodeStart":82,"sourceCodeEnd":104,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/airos/update.py#L82-L104","documentation":"HomeAssistantError raised by the airos update entity when a firmware update fails with any AirOSException other than authentication — the generic 'update_error' fallback. It covers failures during login setup, the firmware download from Ubiquiti servers, or the install command on the device.","triggerScenarios":"async_install's download() or install() raises AirOSConnectionSetupError, AirOSDeviceConnectionError, TimeoutError, or any other AirOSException: device unreachable mid-flow, firmware download interrupted, device refusing install due to low disk/bad image, or timeout while the device upgrades.","commonSituations":"Unstable link to the device during the long download, device running out of storage for the image, mismatched firmware file for the model, or the device dropping the session while installing (which can also look like a timeout even though the install continues).","solutions":["Check the device web interface afterwards — the install may have succeeded despite the timeout; verify the firmware version before retrying.","Ensure a stable network path and adequate timeout before retrying the update.","Free device space or pick the correct firmware for the exact model.","Inspect the chained AirOSException in logs to identify download vs install failure.","Retry via the device web UI if the integration path keeps failing."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"def is_airos_update_error(err: Exception) -> bool:\n    return isinstance(err, HomeAssistantError) and getattr(err, \"translation_domain\", None) == \"airos\" and getattr(err, \"translation_key\", None) == \"update_error\"","tryCatchPattern":"try:\n    await update_entity.async_install(version=None, backup=False)\nexcept HomeAssistantError as err:\n    if getattr(err, \"translation_key\", None) == \"update_error\":\n        # install may still be running on the device: poll the version instead of retrying\n        await asyncio.sleep(300)\n        await coordinator.async_request_refresh()","preventionTips":["Verify the target firmware matches the exact device model before starting an update.","Ensure stable network path and do not power-cycle the device mid-install.","Always check the device's reported firmware version after a timeout — install often completes despite dropped connections."],"tags":["home-assistant","airos","firmware-update","network"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}