home-assistant/core · error · HomeAssistantError

Unable to reposition {self._thing.name}

Error message

Unable to reposition {self._thing.name}

What it means

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.

Source

Thrown at homeassistant/components/brunt/cover.py:166

    @override
    async def async_close_cover(self, **kwargs: Any) -> None:
        """Set the cover to the closed position."""
        await self._async_update_cover(CLOSED_POSITION)

    @override
    async def async_set_cover_position(self, **kwargs: Any) -> None:
        """Set the cover to a specific position."""
        await self._async_update_cover(int(kwargs[ATTR_POSITION]))

    async def _async_update_cover(self, position: int) -> None:
        """Set the cover to the new position and wait for the update to be reflected."""
        try:
            await self.coordinator.bapi.async_change_request_position(
                position, thing_uri=self._thing.thing_uri
            )
        except ClientResponseError as exc:
            raise HomeAssistantError(
                f"Unable to reposition {self._thing.name}"
            ) from exc
        self.coordinator.update_interval = FAST_INTERVAL
        await self.coordinator.async_request_refresh()

    @callback
    def _brunt_update_listener(self) -> None:
        """Update the update interval after each refresh."""
        if (
            self.request_cover_position
            == self.coordinator.bapi.last_requested_positions[self._thing.thing_uri]
            and self.move_state == 0
        ):
            self.coordinator.update_interval = REGULAR_INTERVAL
        else:
            self.coordinator.update_interval = FAST_INTERVAL

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Test the same action from the Brunt app to confirm the cloud accepts commands for that device
  2. If the device was deleted from the account, remove it from Home Assistant too
  3. Reload the integration to force a fresh login if the session went stale
  4. Retry the position command after the API recovers
Defensive patterns

Strategy: try-catch

Validate before calling

# Guard the action on coordinator health first
if not cover.coordinator.last_update_success:
    # Brunt API unhealthy; skip commanding the cover

Try / catch

try:
    await cover.async_set_cover_position(position=50)
except HomeAssistantError as err:
    if 'Unable to reposition' in str(err):
        # Brunt API rejected the command; verify device/account and retry later
        pass
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: Automations moving covers during a Brunt cloud outage; device removed from the account but still configured in HA; expired login token after long uptime.

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/4efb3b5ddb65ea3c. Report an issue: GitHub.