Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/bsblan/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ class DataType(IntEnum):
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)
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread
liudger marked this conversation as resolved.


def _convert_bsblan_value(
Expand Down Expand Up @@ -528,6 +529,15 @@ class HotWaterSchedule(BaseModel):
This class contains time program settings that are typically
configured once and rarely changed.

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.
Comment on lines +532 to +535
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

``dhw_time_program_standard_values`` is a YESNO enum (0=No, 1=Yes)
that resets all daily schedules back to the controller's factory
defaults when set to Yes. It is typically read-only via the API.

Note:
This is for READING from the device. For WRITING time programs,
use SetHotWaterParam with set_hot_water().
Expand All @@ -541,6 +551,7 @@ class HotWaterSchedule(BaseModel):
dhw_time_program_friday: EntityInfo[str | int] | None = None
dhw_time_program_saturday: EntityInfo[str | int] | None = None
dhw_time_program_sunday: EntityInfo[str | int] | None = None
# YESNO enum: resets all daily schedules to factory defaults when Yes (1)
dhw_time_program_standard_values: EntityInfo[int] | None = None


Expand Down
Loading