Add service for setting hot water schedule#156112
Merged
joostlek merged 14 commits intoDec 29, 2025
Merged
Conversation
8 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new service for the BSB-LAN integration to configure hot water heating schedules. The service allows users to set weekly schedules for hot water heating via service calls.
- Implements
set_hot_water_scheduleservice with device-based configuration - Adds comprehensive test coverage including success scenarios and error handling
- Includes service registration in
async_setupand proper cleanup on config entry unload
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/bsblan/services.py |
New service implementation with schedule validation and device lookup logic |
tests/components/bsblan/test_services.py |
Comprehensive test suite covering success cases and error scenarios |
homeassistant/components/bsblan/__init__.py |
Integration setup with service registration and cleanup logic |
homeassistant/components/bsblan/strings.json |
Service descriptions and error message translations |
homeassistant/components/bsblan/services.yaml |
Service schema definition with field selectors |
homeassistant/components/bsblan/icons.json |
Service icon configuration |
joostlek
requested changes
Nov 10, 2025
Contributor
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
0658fb4 to
95f3397
Compare
joostlek
requested changes
Dec 1, 2025
…sive tests for hot water schedule functionality
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… and clean up test code
…dant service removal tests
…nd update related tests
…ields and update related tests
… validation; add tests for end time validation
…eck; add tests for string time formats and validation
…days and empty string for cleared days; update related tests for consistency.
95f3397 to
87e7d04
Compare
…meSlot objects; remove standard_values_slots from service definition and update related strings.
…nd TimeSlot objects; update expected values and error handling for improved clarity and consistency.
joostlek
approved these changes
Dec 29, 2025
Comment on lines
+213
to
+217
| hass.services.async_register( | ||
| DOMAIN, | ||
| SERVICE_SET_HOT_WATER_SCHEDULE, | ||
| set_hot_water_schedule, | ||
| ) |
Contributor
Author
There was a problem hiding this comment.
added a schema @arturpragacz
It was not there because the api in bsblan did the validation. But it's better to do it directly in HA also.
21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change
Proposed change
This pull request adds a new "Set Hot Water Schedule" service to the BSB-Lan integration, allowing users to configure daily hot water heating schedules for their devices through Home Assistant. The implementation includes backend service logic, schema and selector definitions for the service fields, icons, and user-facing strings for validation and error handling.
New Service Implementation
set_hot_water_scheduleservice, enabling users to specify time slots for hot water heating for each day of the week via theservices.pymodule. This includes input validation, error handling, and integration with the BSB-Lan API.__init__.pyvia the newasync_setup_servicesfunction. [1] [2]Service Schema and UI Integration
services.yaml, allowing users to input multiple time slots per day with start and end times for each.icons.jsonfor improved UI representation.User-Facing Strings and Error Handling
strings.json, including detailed error messages for invalid input and a description for the new service and its fields. [1] [2] [3]Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: