home-assistant/core · error · HomeAssistantError
The bond API returned an error calling set_power_state_belie
Error message
The bond API returned an error calling set_power_state_belief for {self.entity_id}. Code: {ex.status} Message: {ex.message} What it means
Raised by the Bond switch entity's async_set_power_belief when Action.set_power_state_belief fails with a ClientResponseError. Applies to switch-platform Bond devices; the message carries entity_id, HTTP status, and the API's message text.
Source
Thrown at homeassistant/components/bond/switch.py:56
@override
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the device on."""
await self._bond.action(self._device_id, Action.turn_on())
@override
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the device off."""
await self._bond.action(self._device_id, Action.turn_off())
async def async_set_power_belief(self, power_state: bool) -> None:
"""Set switch power belief."""
try:
await self._bond.action(
self._device_id, Action.set_power_state_belief(power_state)
)
except ClientResponseError as ex:
raise HomeAssistantError(
"The bond API returned an error calling set_power_state_belief for"
f" {self.entity_id}. Code: {ex.status} Message: {ex.message}"
) from ex
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Use Code: to triage — 401 re-authenticate, 404 reload integration after re-adding device, 5xx retry.
- Confirm switch control works from the Bond app.
- Reduce rapid-fire automations if the hub errors under burst load.
Defensive patterns
Strategy: try-catch
Try / catch
try:
await switch.async_turn_on()
except HomeAssistantError as err:
if "Code: 401" in str(err): trigger_reauth()
elif "Code: 404" in str(err): reload_integration() Prevention
- Rate-limit automations that toggle Bond switches rapidly.
- After re-pairing devices in the Bond app, reload the integration to refresh device_ids.
When it happens
Trigger: Toggle-on/off or state-restore on a Bond switch while the hub returns 4xx/5xx: 401 stale access token, 404 device no longer paired, 400 action rejected.
Common situations: Token regenerated in Bond app, motor/relay device removed from hub, transient hub errors during heavy command bursts.
Related errors
- The bond API returned an error calling set_power_state_belie
- The bond API returned an error calling set_brightness_belief
- The bond API returned an error calling set_light_state_belie
- The bond API returned an error calling set_power_state_belie
- unknown
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/9c72ff2262203d68.
Report an issue: GitHub.