feat(purifier): add support for Levoit Eleva 300X (LAP-C341S-WEU) - #548
Open
HaruIjima-kun wants to merge 2 commits into
Open
feat(purifier): add support for Levoit Eleva 300X (LAP-C341S-WEU)#548HaruIjima-kun wants to merge 2 commits into
HaruIjima-kun wants to merge 2 commits into
Conversation
Adds a new PurifierMap entry using the VeSyncAirBaseV2 class, as the Eleva 300X shares the same bypassV2 protocol as the Vital 100S/200S and Everest Air purifiers. Makes filterLifePercent, screenState, childLockSwitch, screenSwitch, lightDetectionSwitch, environmentLightState, scheduleCount, timerRemain, efficientModeTimeRemain and errorCode optional in PurifierVitalDetailsResult with sensible defaults, and makes V2AutoPreferences.roomSize optional, since the Eleva 300X does not report these fields the same way as existing Vital-class devices. Adds test fixtures for LAP-C341S-WEU in call_json_purifiers.py and the corresponding recorded API response.
for more information, see https://pre-commit.ci
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.
Summary
Adds support for the Levoit Eleva 300X air purifier (device type
LAP-C341S-WEU), which was previously silently dropped by the device map (same root cause as #172743, but for a different product line and model).Details
VeSyncAirBaseV2class via a newPurifierMapentry.sleep,manualandautomodes; nopetmode support confirmed yet, so it's excluded from the modes list (can be added later if confirmed).PurifierVitalDetailsResultrequired several fields the Eleva 300X does not report (filterLifePercentis actually reported; the missing ones arescreenState,childLockSwitch... — adjust wording as needed to match final field list). These are now optional with sensible defaults, which should not affect existing Vital/Everest parsing.V2AutoPreferences.roomSizeis now optional, since the Eleva 300X reportsautoPreferencewithout aroomSizefield.Testing
Verified against a real Eleva 300X account (EU region) using debug logging — confirmed the raw
deviceType(LAP-C341S-WEU) and the fullgetPurifierStatusresponse. AddedLAP-C341S-WEUfixtures tocall_json_purifiers.pyand generated the recorded API response via--write_api. Full test suite passes (397 passed, 3 skipped).