Add LG PuriCare water purifier 1WPU4CIGCR__2 (stateless) - #118
Open
tunarabuuu wants to merge 1 commit into
Open
Conversation
An AA..BB ThinQ2 water purifier (deviceType 103), driven through LG's capability API. The read map doubles as the write map; the sterilization reservation stays read-only because a time-only write moves the appliance's weekly day anchor and LG's schema can't preserve it. Stateless per review: no persistent history in rethink. State and the raw reservation are published straight from each frame; dispense volumes arrive as per-report deltas and are summed into a monotonic counter (reset to zero on restart) published as total_increasing, so Home Assistant does the accumulation the way it already does for energy meters. Reads go through the base class's processAABB; warnings use the logging utility. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tunarabuuu
force-pushed
the
dev-purifier
branch
from
August 2, 2026 22:13
3ec4480 to
fc3557d
Compare
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.
Sixth and last of the per-device-class splits from #111.
1WPU4CIGCR__2 — an AA..BB ThinQ2 water purifier (deviceType 103), driven through LG's capability API (the read map doubles as the write map). The sterilization reservation stays read-only: a time-only write moves the appliance's weekly day anchor and LG's schema can't preserve it.
Addressing your review notes from #111:
total_increasing, so HA does the accumulation exactly as it does for energy meters. The wholepurifier-history-storemodule, the day-rollover/midnight timers, the persisted sterilization schedule, and the "last month count / last sterilize" entities are gone.processAABBnow (offsets need no whole-frame adjustment).month.day HH:MM, no timezone conversion.console.warncalls now uselog(...).The driver drops from ~1030 lines to ~330. All labels are English.
npm testpasses;tscclean.This completes the split; I'll close #111 and link all six here.