{"record":{"id":"f2e55140af4a3a39","repo":"home-assistant/core","slug":"error-communicating-with-api-err-f2e551","errorCode":null,"errorMessage":"Error communicating with API: {err}","messagePattern":"Error communicating with API: (.+?)","errorType":"exception","errorClass":"UpdateFailed","httpStatus":null,"severity":"error","filePath":"homeassistant/components/aosmith/coordinator.py","lineNumber":64,"sourceCode":"        \"\"\"Initialize the coordinator.\"\"\"\n        super().__init__(\n            hass,\n            _LOGGER,\n            config_entry=config_entry,\n            name=DOMAIN,\n            update_interval=REGULAR_INTERVAL,\n        )\n        self.client = client\n\n    @override\n    async def _async_update_data(self) -> dict[str, AOSmithDevice]:\n        \"\"\"Fetch latest data from the device status endpoint.\"\"\"\n        try:\n            devices = await self.client.get_devices()\n        except AOSmithInvalidCredentialsException as err:\n            raise ConfigEntryAuthFailed from err\n        except AOSmithUnknownException as err:\n            raise UpdateFailed(f\"Error communicating with API: {err}\") from err\n\n        mode_pending = any(device.status.mode_change_pending for device in devices)\n        setpoint_pending = any(\n            device.status.temperature_setpoint_pending for device in devices\n        )\n\n        if mode_pending or setpoint_pending:\n            self.update_interval = FAST_INTERVAL\n        else:\n            self.update_interval = REGULAR_INTERVAL\n\n        return {device.junction_id: device for device in devices}\n\n\nclass AOSmithEnergyCoordinator(DataUpdateCoordinator[dict[str, float]]):\n    \"\"\"Coordinator for energy usage data, updating with a slower interval.\"\"\"\n\n    config_entry: AOSmithConfigEntry","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/aosmith/coordinator.py#L46-L82","documentation":"An UpdateFailed raised with message 'Error communicating with API: {err}' when the A. O. Smith coordinator's get_devices() call raises AOSmithUnknownException. Credentials problems are separately mapped to ConfigEntryAuthFailed; this error covers every other failure talking to the service, so the coordinator retries with backoff.","triggerScenarios":"await self.client.get_devices() failing for non-auth reasons: aiohttp connection errors, 5xx from the API, unexpected response payloads parsed by py-aosmith, or rate limiting.","commonSituations":"A. O. Smith cloud outage or maintenance, local network problems, or a py-aosmith version lagging an API schema change (device status fields renamed).","solutions":["Check the {err} detail in logs to identify HTTP status vs parsing failure","Verify connectivity and wait out transient cloud errors — the coordinator retries automatically","Update Home Assistant to pick up a current py-aosmith if the API response format changed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    devices = await self.client.get_devices()\nexcept AOSmithInvalidCredentialsException as err:\n    raise ConfigEntryAuthFailed from err\nexcept AOSmithUnknownException as err:\n    raise UpdateFailed(f\"Error communicating with API: {err}\") from err","preventionTips":["Distinguish auth failures from generic API failures so reauth is not spuriously triggered","Rely on coordinator backoff for transient cloud errors"],"tags":["home-assistant","aosmith","api","coordinator","update-failed"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}