{"record":{"id":"fed3b0b03906698a","repo":"home-assistant/core","slug":"failed-to-press-button-button","errorCode":null,"errorMessage":"Failed to press {button} button.","messagePattern":"Failed to press (.+?) button\\.","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/airobot/button.py","lineNumber":84,"sourceCode":"    entity_description: AirobotButtonEntityDescription\n\n    def __init__(\n        self,\n        coordinator: AirobotDataUpdateCoordinator,\n        description: AirobotButtonEntityDescription,\n    ) -> None:\n        \"\"\"Initialize the button.\"\"\"\n        super().__init__(coordinator)\n        self.entity_description = description\n        self._attr_unique_id = f\"{coordinator.data.status.device_id}_{description.key}\"\n\n    @override\n    async def async_press(self) -> None:\n        \"\"\"Handle the button press.\"\"\"\n        try:\n            await self.entity_description.press_fn(self.coordinator)\n        except AirobotError as err:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"button_press_failed\",\n                translation_placeholders={\"button\": self.entity_description.key},\n            ) from err\n","sourceCodeStart":66,"sourceCodeEnd":89,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/airobot/button.py#L66-L89","documentation":"Raised by the Airobot button entity's async_press when the entity_description.press_fn coroutine raises any AirobotError. It becomes HomeAssistantError with translation key button_press_failed and the button's description key as placeholder, so the UI shows which button failed and why the underlying call failed (via the chained exception in logs).","triggerScenarios":"Pressing an Airobot button (e.g. trigger a cleaning action) while the robot's cloud API call fails: device offline, cloud service unreachable, auth token stale, or the API rejects the command.","commonSituations":"Robot powered off or off Wi-Fi, Airobot cloud outage, or account credentials/token invalidated (which will soon also surface via ConfigEntryAuthFailed in the coordinator).","solutions":["Confirm the robot is powered on and connected to the cloud (check the vendor app)","Retry the button press after the device is back online","If presses consistently fail, reload the integration or re-authenticate the config entry","Inspect the chained original AirobotError in the HA log for the precise API failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await hass.services.async_call(\"button\", \"press\", {\"entity_id\": \"button.xxx\"}, blocking=True)\nexcept HomeAssistantError as err:\n    _LOGGER.warning(\"Airobot button press failed: %s\", err)","preventionTips":["Check the robot is online (vendor app) before automation-triggered presses","In automations, prefer retrying on next trigger over alerting per failure","Keep the integration authenticated to avoid stale-token command failures"],"tags":["airobot","home-assistant","button","cloud-api"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}