{"record":{"id":"4efb3b5ddb65ea3c","repo":"home-assistant/core","slug":"unable-to-reposition-self-thing-name","errorCode":null,"errorMessage":"Unable to reposition {self._thing.name}","messagePattern":"Unable to reposition (.+?)","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/brunt/cover.py","lineNumber":166,"sourceCode":"\n    @override\n    async def async_close_cover(self, **kwargs: Any) -> None:\n        \"\"\"Set the cover to the closed position.\"\"\"\n        await self._async_update_cover(CLOSED_POSITION)\n\n    @override\n    async def async_set_cover_position(self, **kwargs: Any) -> None:\n        \"\"\"Set the cover to a specific position.\"\"\"\n        await self._async_update_cover(int(kwargs[ATTR_POSITION]))\n\n    async def _async_update_cover(self, position: int) -> None:\n        \"\"\"Set the cover to the new position and wait for the update to be reflected.\"\"\"\n        try:\n            await self.coordinator.bapi.async_change_request_position(\n                position, thing_uri=self._thing.thing_uri\n            )\n        except ClientResponseError as exc:\n            raise HomeAssistantError(\n                f\"Unable to reposition {self._thing.name}\"\n            ) from exc\n        self.coordinator.update_interval = FAST_INTERVAL\n        await self.coordinator.async_request_refresh()\n\n    @callback\n    def _brunt_update_listener(self) -> None:\n        \"\"\"Update the update interval after each refresh.\"\"\"\n        if (\n            self.request_cover_position\n            == self.coordinator.bapi.last_requested_positions[self._thing.thing_uri]\n            and self.move_state == 0\n        ):\n            self.coordinator.update_interval = REGULAR_INTERVAL\n        else:\n            self.coordinator.update_interval = FAST_INTERVAL\n","sourceCodeStart":148,"sourceCodeEnd":183,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/brunt/cover.py#L148-L183","documentation":"HomeAssistantError raised by the Brunt cover when async_change_request_position fails with ClientResponseError — the cloud API returned an HTTP error instead of accepting the new position. The failed service call surfaces in the UI/log with the cover's name; after a success the code speeds up polling (FAST_INTERVAL) to track the move, which is skipped on failure.","triggerScenarios":"Calling open/close/set_position while the Brunt API is erroring (401 device removed from account, 5xx, etc.); thing_uri no longer valid because the device was deleted from the Brunt account; stale session token causing 4xx responses.","commonSituations":"Automations moving covers during a Brunt cloud outage; device removed from the account but still configured in HA; expired login token after long uptime.","solutions":["Test the same action from the Brunt app to confirm the cloud accepts commands for that device","If the device was deleted from the account, remove it from Home Assistant too","Reload the integration to force a fresh login if the session went stale","Retry the position command after the API recovers"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# Guard the action on coordinator health first\nif not cover.coordinator.last_update_success:\n    # Brunt API unhealthy; skip commanding the cover","typeGuard":null,"tryCatchPattern":"try:\n    await cover.async_set_cover_position(position=50)\nexcept HomeAssistantError as err:\n    if 'Unable to reposition' in str(err):\n        # Brunt API rejected the command; verify device/account and retry later\n        pass\n    else:\n        raise","preventionTips":["Command covers only when the coordinator's last refresh succeeded","Remove HA devices deleted from the Brunt account to avoid persistent 401s","Reload the integration after long uptimes to refresh the login session"],"tags":["brunt","cover","service-call","cloud-api","home-assistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}