-
Notifications
You must be signed in to change notification settings - Fork 2
Add TIMEPROG data type #1363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TIMEPROG data type #1363
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
liudger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| def _convert_bsblan_value( | ||
|
|
@@ -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
|
||
|
|
||
| ``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(). | ||
|
|
@@ -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 | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
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.