chore(lux_overrides): 🔧 adopt upstream datatypes for the Mk3 timer block, limit temperatures and counters - #804
Merged
Conversation
…atures - Mixing circuit 3 sits apart from the 162-667 run: 788 is its program selector and 789-848 its WO/25/TG time block, the same shape as the other circuits; the override stopped at 667 and left the whole block Unknown. Two corpus units carry 34200 / 18000 (09:30 / 05:00) in 789 - 84, 87, 91, 92, 94, 96 (TLG_max, TRBegr, TAmax, TAmin, THGmax, TV2VDBW) join the Celsius bulk list: every unit in the diagnostics corpus stores them as tenths (700, 560, 350, -200, 1150, 500) - Both match the types upstream python-luxtronik main assigns; nothing in the integration reads these registers yet, so this only changes how diagnostics render them Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ntity date - 668-673, 728-730 and 859 (ID_Zaehler_BetrZeit*) are the parameter-side mirrors of the operating-time calculations 56-66 and count seconds; they now carry the library's Seconds datatype - 880 ID_Waermemenge_Datum is a Unix timestamp; eight corpus units sit on its 2018-01-01 factory default - Both match upstream python-luxtronik main; nothing in the integration reads these registers, so this only changes how diagnostics render them Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- The six Celsius limit temperatures are not uniform across the corpus (84 at 650-700, 87 at 350-650, 91 at 350-450, 92 at -200/-220, 94 at 1150-1400, only 96 at 500 everywhere); the comment and test docstring now say so instead of quoting one value per register - Note that 880 reads 0 on eight units, which the library's Timestamp renders as 1970-01-01, the same as parameters 6/7/731/732 - Lock both ends of the Mk3 block (787 and 849) in the coverage test and pin the 2018-01-01 default of 880 tz-independently Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…pes-mk3-celsius # Conflicts: # custom_components/luxtronik2/lux_overrides.py
Contributor
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🔍 What this fixes
A diff of the datatypes we run (python-luxtronik 0.3.14 +
lux_overrides) against upstreampython-luxtronikmainturned up a handful of registers upstream has typed that we still carry asUnknown. The ones here are confirmed by the local diagnostics corpus (30 heat pumps) and have no reader in the integration, so the change is limited to how diagnostics dumps render them — nothing user-visible. Follow-up to #789'sTimeOfDay2work; the entity-facing candidates (last defrost → #803, refrigerant temperatures / compressor frequency limits) are handled separately.✨ Changes
All in
custom_components/luxtronik2/lux_overrides.py/update_Luxtronik_Parameters:ID_Einst_SuMk3_akt2joins theTimerProgramselectors, 789–848 (SuMk3Wo/25/Tg) theTimeOfDayrange. The override stopped at 667 and missed this block entirely. Corpus: 789/790 hold 34200/61200 and 18000/79200 (09:30–17:00, 05:00–22:00) on two units, one time per register — the same shape as the other circuits, not the packed ventilation layout.TLG_max, 87TRBegr, 91TAmax, 92TAmin, 94THGmax, 96TV2VDBWjoin theCelsiusbulk list. All 30 units store plausible tenths (84 at 650–700, 87 at 350–650, 91 at 350–450, 92 at −200/−220, 94 at 1150–1400, 96 at 500 everywhere).ID_Zaehler_BetrZeit*), the parameter-side mirrors of calculations 56–66, get the library'sSeconds.ID_Waermemenge_Datumgets the library'sTimestamp(eight units on the 2018‑01‑01 factory default, eight on 0 → 1970‑01‑01, as 6/7/731/732 already render).Verified: no
LuxParametermember, visibility gate,factor=or select map reads any of these registers, so the #773/#777 failure mode (a datatype change silently changing a reader) does not apply. No overlap withparameters_to_add_updateor the Kelvin list.🧪 Tests
tests/test_lux_overrides.py: names, classes and a corpus conversion for every register; both ends of the Mk3 block locked (787 and 849 untyped); 880's default pinned timezone-independently. Full run: 1276 passed, 1 skipped, coverage 100 % (unchanged); ruff check/format, basedpyright (0), codespell clean. Independently code-reviewed; findings applied.Note for merging: this touches the same
schedule_numbershunk asfix/789-ventilation-slot-registers; whichever lands second gets a small, mechanical conflict (keep #789's structure, addrange(788, 849)to itsTimeOfDaylist and 788 totimer_program_numbers).🤖 Generated with Claude Code