{"record":{"id":"49eb5aa418f31b5d","repo":"home-assistant/core","slug":"set-schedule-failed","errorCode":"set_schedule_failed","errorMessage":"Failed to set hot water schedule: {error}","messagePattern":"Failed to set hot water schedule: (.+?)","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/bsblan/services.py","lineNumber":199,"sourceCode":"        translation_placeholders={\"device_name\": _device_name(device_entry)},\n    )\n\n\nasync def set_hot_water_schedule(service_call: ServiceCall) -> None:\n    \"\"\"Set hot water heating schedule.\"\"\"\n    entry, device_entry = _resolve_config_entry(service_call)\n    _ensure_water_heater_device(device_entry)\n    client = entry.runtime_data.client\n\n    days = _build_weekly_schedule_days(service_call)\n    dhw_schedule = DHWSchedule(**days)\n\n    LOGGER.debug(\"Setting hot water schedule: %s\", dhw_schedule)\n\n    try:\n        await client.set_hot_water_schedule(dhw_schedule)\n    except BSBLANError as err:\n        raise HomeAssistantError(\n            translation_domain=DOMAIN,\n            translation_key=\"set_schedule_failed\",\n            translation_placeholders={\"error\": str(err)},\n        ) from err\n\n    # Refresh the slow coordinator to get the updated schedule\n    await entry.runtime_data.slow_coordinator.async_request_refresh()\n\n\nasync def async_sync_time(service_call: ServiceCall) -> None:\n    \"\"\"Synchronize BSB-LAN device time with Home Assistant.\"\"\"\n    entry, device_entry = _resolve_config_entry(service_call)\n    client = entry.runtime_data.client\n    await async_sync_device_time(\n        client, device_entry.name or service_call.data[ATTR_DEVICE_ID]\n    )\n\n","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/bsblan/services.py#L181-L217","documentation":"HomeAssistantError raised when `client.set_hot_water_schedule(dhw_schedule)` raises BSBLANError while applying a validated weekly schedule. Translation key `set_schedule_failed` embeds the underlying error string via the `error` placeholder. Validation has already succeeded at this point, so this is purely a device-communication or device-rejection failure.","triggerScenarios":"Calling `bsblan.set_hot_water_schedule` against an unreachable device, or when the device rejects the schedule payload (e.g. DHW schedule parameters not supported by the boiler's type/brand, or bus busy).","commonSituations":"Boiler models without DHW timer support; transient connectivity loss between validation and write; firmware that requires a different parameter format for DHW schedules.","solutions":["Confirm the device is online and state entities update, then retry the action.","Verify the boiler actually supports a DHW schedule via the BSB-LAN web UI (try setting a schedule manually there).","Update BSB-LAN firmware and Home Assistant so schedule payload formats match.","Check debug logs for the embedded `error` string, which carries the library-level reason."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await client.set_hot_water_schedule(dhw_schedule)\nexcept BSBLANError as err:\n    raise HomeAssistantError(\n        translation_domain=DOMAIN, translation_key=\"set_schedule_failed\",\n        translation_placeholders={\"error\": str(err)},\n    ) from err","preventionTips":["Run schedule writes only when the device's state entities are updating.","Verify the boiler supports DHW scheduling from its web UI first.","Set continue_on_error on scheduled automation runs."],"tags":["home-assistant","bsblan","schedule","water-heater","write"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}