{"record":{"id":"928bccba8459441e","repo":"home-assistant/core","slug":"set-data-error","errorCode":"set_data_error","errorMessage":"An error occurred while sending the data to the BSB-LAN device","messagePattern":"An error occurred while sending the data to the BSB-LAN device","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/bsblan/climate.py","lineNumber":213,"sourceCode":"\n    async def async_set_data(self, **kwargs: Any) -> None:\n        \"\"\"Set device settings using BSBLAN.\"\"\"\n        data: dict[str, Any] = {}\n        if ATTR_TEMPERATURE in kwargs:\n            data[ATTR_TARGET_TEMPERATURE] = kwargs[ATTR_TEMPERATURE]\n        if ATTR_HVAC_MODE in kwargs:\n            data[ATTR_HVAC_MODE] = HA_TO_BSBLAN_HVAC_MODE[kwargs[ATTR_HVAC_MODE]]\n        if ATTR_PRESET_MODE in kwargs:\n            # eco preset uses BSB-LAN mode 2, none preset uses mode 1 (auto)\n            if kwargs[ATTR_PRESET_MODE] == PRESET_ECO:\n                data[ATTR_HVAC_MODE] = 2\n            elif kwargs[ATTR_PRESET_MODE] == PRESET_NONE:\n                data[ATTR_HVAC_MODE] = 1\n\n        try:\n            await self.coordinator.client.thermostat(**data, circuit=self._circuit)\n        except BSBLANError as err:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"set_data_error\",\n            ) from err\n        await self.coordinator.async_request_refresh()\n","sourceCodeStart":195,"sourceCodeEnd":218,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bsblan/climate.py#L195-L218","documentation":"Raised by the bsblan climate entity when `client.thermostat(**data, circuit=...)` raises any BSBLANError while applying a new HVAC mode, preset, or setpoint. It is wrapped in HomeAssistantError with translation key `set_data_error`, so the action call fails visibly in the UI/logbook while the coordinator is left to re-sync from the device.","triggerScenarios":"Calling `climate.set_hvac_mode`, `climate.set_preset_mode`, or `climate.set_temperature` on a bsblan climate entity when the write to the device fails — connection dropped, auth rejected mid-session, or the device rejected the parameter value for the given circuit.","commonSituations":"Device briefly unreachable when the action fires; writing a setpoint outside the boiler's allowed range; serial bus busy with polling so the write times out and surfaces as BSBLANError.","solutions":["Retry the action once the entity's state data is updating normally (check for coordinator update errors first).","Verify the target value is within the min/max shown on the entity card.","If persistent, test the same parameter write via the BSB-LAN web UI to isolate integration vs device.","Check integration logs with debug enabled for the underlying BSBLANError message."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await coordinator.client.thermostat(**data, circuit=circuit)\nexcept BSBLANError as err:\n    raise HomeAssistantError(translation_domain=DOMAIN, translation_key=\"set_data_error\") from err","preventionTips":["Gate write automations on the climate entity being available.","Respect the entity's min/max temperature attributes when composing setpoints.","Use continue_on_error on scheduled mode changes so one failed write doesn't kill the automation."],"tags":["home-assistant","bsblan","climate","write","thermostat"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}