{"record":{"id":"826059871abe3b6b","repo":"home-assistant/core","slug":"failed-to-install-update-err","errorCode":null,"errorMessage":"Failed to install update: {err}","messagePattern":"Failed to install update: (.+?)","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/adguard/update.py","lineNumber":70,"sourceCode":"\n    @override\n    async def _adguard_update(self) -> None:\n        \"\"\"Update AdGuard Home entity.\"\"\"\n        value = await self.adguard.update.update_available()\n        self._attr_installed_version = self.data.version\n        self._attr_latest_version = value.new_version\n        self._attr_release_summary = value.announcement\n        self._attr_release_url = value.announcement_url\n\n    @override\n    async def async_install(\n        self, version: str | None, backup: bool, **kwargs: Any\n    ) -> None:\n        \"\"\"Install latest update.\"\"\"\n        try:\n            await self.adguard.update.begin_update()\n        except AdGuardHomeError as err:\n            raise HomeAssistantError(f\"Failed to install update: {err}\") from err\n        self.hass.config_entries.async_schedule_reload(self._entry.entry_id)\n","sourceCodeStart":52,"sourceCodeEnd":72,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/adguard/update.py#L52-L72","documentation":"HomeAssistantError raised by AdGuardUpdate.async_install when adguard.update.begin_update() throws AdGuardHomeError. It aborts the update-install action with a raw f-string message (no translation key) and — importantly — the config-entry reload scheduled on the following line never runs because the exception propagates first.","triggerScenarios":"Pressing 'Install' on the AdGuard Home update entity while the server cannot start its self-update: no internet on the AdGuard host, insufficient permissions, or an unsupported update channel/version check failure from the AdGuard API.","commonSituations":"AdGuard Home running in a container without permission to replace its binary, restricted egress blocking downloads from the AdGuard update servers, or version mismatch where the client's update API call is rejected.","solutions":["Check the chained AdGuardHomeError in the Home Assistant log for the exact API failure reason.","Verify the AdGuard Home host can reach the internet and its update servers (from the AdGuard UI itself, check for updates).","If running in Docker, update the container image instead of the in-app updater, or run with the volumes/permissions the updater needs.","Retry the install from the AdGuard Home web UI to confirm the server side works, then retry from Home Assistant.","Optionally patch the integration to use translation_domain/translation_key like switch.py does, so users get a localized message."],"exampleFix":"// before\ntry:\n    await self.adguard.update.begin_update()\nexcept AdGuardHomeError as err:\n    raise HomeAssistantError(f\"Failed to install update: {err}\") from err\n\n// after\ntry:\n    await self.adguard.update.begin_update()\nexcept AdGuardHomeError as err:\n    raise HomeAssistantError(\n        translation_domain=DOMAIN,\n        translation_key=\"install_failed\",\n        translation_placeholders={\"error\": str(err)},\n    ) from err","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from homeassistant.exceptions import HomeAssistantError\n\ntry:\n    await hass.services.async_call(\n        \"update\", \"install\", {\"entity_id\": \"update.adguard_home\"}\n    )\nexcept HomeAssistantError as err:\n    _LOGGER.error(\"AdGuard self-update failed: %s\", err)  # check chained AdGuardHomeError","preventionTips":["Prefer updating AdGuard Home via its own UI or container image; the in-app updater needs host-level permissions.","Ensure the AdGuard host has internet access to the update servers before triggering install from HA.","Note the entry reload is skipped on failure — re-run install after fixing the server side."],"tags":["homeassistant","adguard","update-entity","api-error"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}