Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a new TIMEPROG data type (value 9) to the DataType enum to represent BSB-LAN time program schedule data, and enhances the documentation for the HotWaterSchedule class to explain the format and behavior of daily time program fields.
Changes:
- Added
TIMEPROG = 9to theDataTypeenum for time program schedule slots - Enhanced the
HotWaterScheduleclass docstring with details about time program format and usage - Added an inline comment clarifying that
dhw_time_program_standard_valuesis a YESNO enum that resets schedules
| The daily time programs (Monday-Sunday) use BSB-LAN dataType 9 | ||
| (TIMEPROG) and return schedule strings like | ||
| ``"13:00-15:00 ##:##-##:## ##:##-##:##"`` where ``##:##`` marks | ||
| unused time slots. |
There was a problem hiding this comment.
The documentation claims that daily time programs use BSB-LAN dataType 9 (TIMEPROG), but the existing test fixture in test_hot_water_additional.py uses dataType 0 (PLAIN_NUMBER) for all schedule parameters (lines 153, 160, 167, 174, 181, 188, 195). This creates a discrepancy between the documentation and the test data. Either the test fixtures should be updated to use dataType 9, or the documentation should be corrected to reflect the actual dataType used by BSB-LAN devices for time program parameters.
| DATE = 6 # Day and month | ||
| STRING = 7 # String value | ||
| PPS_TIME = 8 # PPS time (day of week, hour:minute) | ||
| TIMEPROG = 9 # Time program (schedule slots) |
There was a problem hiding this comment.
The new TIMEPROG data type is added to the DataType enum but is not handled in the _convert_bsblan_value function (lines 222-269). This function has explicit handling for PLAIN_NUMBER, ENUM, TIME, and WEEKDAY types, but other types including STRING, PPS_TIME, and now TIMEPROG fall through to the default string handling. While this may be intentional (keeping time program strings as-is), it should be verified that TIMEPROG values don't require special parsing, or explicit handling should be added for clarity and consistency with the comment on line 219.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1363 +/- ##
=======================================
Coverage 99.88% 99.88%
=======================================
Files 6 6
Lines 907 908 +1
Branches 128 128
=======================================
+ Hits 906 907 +1
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



This pull request enhances the documentation and data modeling for hot water scheduling in the BSB-LAN integration. The main improvements clarify the handling and representation of time program schedules and introduce a new data type for these schedules.
Data modeling improvements:
TIMEPROGvalue (9) to theDataTypeenum to represent time program (schedule slots) data types, improving clarity and type safety for schedule-related fields (src/bsblan/models.py).Documentation enhancements:
HotWaterScheduleclass to explain the format and usage of daily time program fields, including examples and notes about thedhw_time_program_standard_valuesreset behavior (src/bsblan/models.py).dhw_time_program_standard_valuesfield to indicate it is a YESNO enum and describes its effect when set (src/bsblan/models.py).