{"record":{"id":"51378b3449398544","repo":"home-assistant/core","slug":"set-temperature-error","errorCode":"set_temperature_error","errorMessage":"An error occurred while setting the temperature","messagePattern":"An error occurred while setting the temperature","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/bsblan/water_heater.py","lineNumber":172,"sourceCode":"\n    @property\n    @override\n    def target_temperature(self) -> float | None:\n        \"\"\"Return the temperature we try to reach.\"\"\"\n        if (target_temp := self._dhw.nominal_setpoint) is None:\n            return None\n        return target_temp.value\n\n    @override\n    async def async_set_temperature(self, **kwargs: Any) -> None:\n        \"\"\"Set new target temperature.\"\"\"\n        temperature = kwargs.get(ATTR_TEMPERATURE)\n        try:\n            await self.coordinator.client.set_hot_water(\n                SetHotWaterParam(nominal_setpoint=temperature)\n            )\n        except BSBLANError as err:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"set_temperature_error\",\n            ) from err\n\n        await self.coordinator.async_request_refresh()\n\n    @override\n    async def async_set_operation_mode(self, operation_mode: str) -> None:\n        \"\"\"Set new operation mode.\"\"\"\n        # Base class validates operation_mode is in operation_list before calling\n        bsblan_mode = HA_TO_BSBLAN_OPERATION_MODE[operation_mode]\n        try:\n            # Send numeric value as string - BSB-LAN API expects numeric mode values\n            await self.coordinator.client.set_hot_water(\n                SetHotWaterParam(operating_mode=str(bsblan_mode))\n            )\n        except BSBLANError as err:\n            raise HomeAssistantError(","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bsblan/water_heater.py#L154-L190","documentation":"HomeAssistantError raised by the bsblan water-heater entity when `client.set_hot_water(SetHotWaterParam(nominal_setpoint=temperature))` raises BSBLANError, translation key `set_temperature_error`. It makes `water_heater.set_temperature` fail visibly instead of silently keeping stale state; a coordinator refresh follows on success only.","triggerScenarios":"Calling `water_heater.set_temperature` on a bsblan water heater while the device is unreachable, or writing a nominal setpoint outside the range the device accepts for DHW.","commonSituations":"Device offline when an automation or dashboard card pushes a new DHW temperature; setpoints outside the boiler's configured min/max; serial bus congestion from simultaneous polling.","solutions":["Retry once the device is confirmed online (state data updating).","Keep values within the water-heater entity's min/max temperature attributes.","If persistent, test the same parameter write in the BSB-LAN web UI to see the device-side rejection reason."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await client.set_hot_water(SetHotWaterParam(nominal_setpoint=temp))\nexcept BSBLANError as err:\n    raise HomeAssistantError(translation_domain=DOMAIN, translation_key=\"set_temperature_error\") from err","preventionTips":["Clamp desired temperatures to the entity's min/max attributes in automations.","Condition DHW temperature changes on the water heater being available.","Retry once after connectivity is restored rather than stacking multiple writes."],"tags":["home-assistant","bsblan","water-heater","temperature","write"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}