Skip to content

feat(text): add editable DHW timer-program schedule entities#675

Merged
rhammen merged 3 commits into
mainfrom
TimeOfDay-support
Jul 5, 2026
Merged

feat(text): add editable DHW timer-program schedule entities#675
rhammen merged 3 commits into
mainfrom
TimeOfDay-support

Conversation

@rhammen

@rhammen rhammen commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds TimeOfDay/TimerProgram datatype overrides for Luxtronik parameters 162-667 (the six timer-program schedule blocks), classifying the ~500 raw start/end time parameters and their 6 mode selectors correctly instead of leaving them as Unknown.
  • Adds a new text platform exposing the DHW (Bw) circuit's active timer-program schedule as 10 editable "HH:MM-HH:MM/..." entities (week / weekday / weekend / one per day), instead of hundreds of individual per-row time entities.
  • Each schedule entity reads/writes its block's underlying parameters directly by raw name (bypassing the LuxParameter enum, which would need ~500 boilerplate members for this range), only writes rows whose value actually changed, and clears trailing rows when the string is shortened.
  • Entities dynamically report unavailable when their circuit's mode selector isn't set to the schedule shape they represent, so only the currently active schedule is editable — no reload needed if the mode changes on the device.
  • Only the DHW (Bw) circuit is wired up so far, to validate the approach before rolling out to the other 5 timer-program circuits (Hkr/Mk1/Mk2/ZIP/Swb); extending is additive per circuit.

Test plan

  • ruff check / ruff format --check clean
  • basedpyright — 0 errors
  • pytest --cov=custom_components.luxtronik2 — full suite passes, 99% coverage, new files at 100%
  • New tests/test_text.py: table-integrity check against the real luxtronik.Parameters registry, schedule-string parsing, entity rendering/availability/diff-based-write behavior
  • Manually tested against a live heat pump

rhammen added 3 commits July 5, 2026 14:19
- Adds a new text platform exposing the DHW (Bw) circuit's active
  timer-program schedule (week/weekday-weekend/per-day) as 10 editable
  "HH:MM-HH:MM/..." entities instead of hundreds of per-row time entities.
- Each entity reads/writes its block's underlying start/end parameters
  directly by raw name (bypassing the LuxParameter enum, which would need
  ~500 boilerplate members for this range), only writes rows that actually
  changed, and clears trailing rows when the string is shortened.
- Entities dynamically report unavailable when their circuit's mode
  selector isn't set to the schedule shape they represent, so only the
  active schedule is editable at any time.
- Other 5 timer-program circuits (Hkr/Mk1/Mk2/ZIP/Swb) intentionally
  deferred until this is validated; extending is additive per circuit.
- Closes a coverage gap: TimeOfDay was the only datatype override in this
  file without its own test class, unlike its siblings SecondsToHours and
  FrequencyAutomatic. Brings lux_overrides.py from 86% to 100% coverage.
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
custom_components.luxtronik2 100%
Summary 100% (2999 / 3000)

@rhammen rhammen merged commit 4f0d6bf into main Jul 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant