home-assistant/core · error · HomeAssistantError
set_operation_mode_error
set_operation_mode_error
Error message
An error occurred while setting the operation mode
What it means
HomeAssistantError raised by the bsblan water-heater entity when `client.set_hot_water(SetHotWaterParam(operating_mode=str(bsblan_mode)))` raises BSBLANError, translation key `set_operation_mode_error`. The HA operation mode is already validated against operation_list by the base class before this point, so failure means the device rejected the numeric mode string or communication broke. Also reached via `async_turn_on` (which sets STATE_PERFORMANCE).
Source
Thrown at homeassistant/components/bsblan/water_heater.py:190
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="set_temperature_error",
) from err
await self.coordinator.async_request_refresh()
@override
async def async_set_operation_mode(self, operation_mode: str) -> None:
"""Set new operation mode."""
# Base class validates operation_mode is in operation_list before calling
bsblan_mode = HA_TO_BSBLAN_OPERATION_MODE[operation_mode]
try:
# Send numeric value as string - BSB-LAN API expects numeric mode values
await self.coordinator.client.set_hot_water(
SetHotWaterParam(operating_mode=str(bsblan_mode))
)
except BSBLANError as err:
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="set_operation_mode_error",
) from err
await self.coordinator.async_request_refresh()
@override
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the water heater on."""
await self.async_set_operation_mode(STATE_PERFORMANCE)
@override
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the water heater off."""
await self.async_set_operation_mode(STATE_OFF)
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Verify connectivity (entity state not unavailable) and retry.
- Confirm the target mode is in the entity's operation_list; `turn_on` maps to performance mode.
- Test the equivalent mode write in the BSB-LAN web UI to isolate device-side rejection.
- Enable debug logging to capture the underlying BSBLANError.
Defensive patterns
Strategy: try-catch
Try / catch
try:
await client.set_hot_water(SetHotWaterParam(operating_mode=str(bsblan_mode)))
except BSBLANError as err:
raise HomeAssistantError(translation_domain=DOMAIN, translation_key="set_operation_mode_error") from err Prevention
- Remember water_heater.turn_on maps to performance mode — the device must accept it.
- Gate mode-change automations on entity availability.
- Test mode writes manually once after firmware updates to confirm acceptance.
When it happens
Trigger: Calling `water_heater.set_operation_mode` or `water_heater.turn_on` on a bsblan water heater while offline, or when the boiler rejects the mapped numeric operating mode for DHW.
Common situations: Automations turning DHW to performance mode in the morning while the device is briefly unreachable; boilers whose firmware doesn't accept mode writes on the DHW parameter set.
Related errors
- set_schedule_failed
- set_temperature_error
- set_data_error
- not_a_water_heater_device
- Operation mode not supported
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/d83537e50b48eb2c.
Report an issue: GitHub.