feat: add support for Levoit Vital Pet air purifier (LAP-P201S-WUS) - #535
Open
bryanhong wants to merge 3 commits into
Open
feat: add support for Levoit Vital Pet air purifier (LAP-P201S-WUS)#535bryanhong wants to merge 3 commits into
bryanhong wants to merge 3 commits into
Conversation
- Add device_map entry: VeSyncAirBaseV2, modes sleep/manual/odorShieldBalanced,
fan levels 1-3, air quality feature (no light detection on this model)
- Add PurifierModes.ODOR_SHIELD_BALANCED ('odorShieldBalanced')
- Make lightDetectionSwitch/environmentLightState/efficientModeTimeRemain
optional in PurifierVitalDetailsResult (Vital Pet omits them) and add the
model's additional fields (VOC, odorLevel, buzzerSwitch, filter day counters,
screen/child-lock preference sub-models)
- Wire VOC into purifier state when present
- Fix case-sensitive mode matching in set_mode (VeSyncAirBypass/VeSyncAirBaseV2):
mode.lower() could never match camelCase mode values like odorShieldBalanced
All changes verified against physical hardware (LAP-P201S-WUS, US firmware):
discovery, full state parse, fan speed set/restore, mode set/restore, display toggle.
…ed on LAP-P201S-WUS)
for more information, see https://pre-commit.ci
bryanhong
marked this pull request as ready for review
July 29, 2026 04:53
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.
Add support for Levoit Vital Pet air purifier (LAP-P201S-WUS)
Adds the Levoit Vital Pet (LAP-P201S-WUS) to the purifier device map. All behavior below was validated against real hardware (US region) — mode strings were probed via
setPurifierModebypassV2 calls and confirmed by observing the device and the VeSync app.Changes
device_map.py— newPurifierMapentry:VeSyncAirBaseV2, 3 fan levels,AIR_QUALITYfeature, modessleep/manual/odorShieldQuiet/odorShieldBalanced/odorShieldPerformance, setup entryLAP-P201S, alias "Vital Pet".const.py— newPurifierModesmembersODOR_SHIELD_QUIET,ODOR_SHIELD_BALANCED,ODOR_SHIELD_PERFORMANCE. These are the device's "Auto" mode family: the app presents Auto with a Quiet/Balanced/Performance preference, and each preference is a distinctworkMode. (odorShieldPlus/autoPlusspellings were probed and rejected by the API — the app's "Plus" appears to be a separate toggle, not a work mode.)models/purifier_models.py— madelightDetectionSwitch,environmentLightState,efficientModeTimeRemainoptional (this device omits them) and added fields it returns:VOC,odorLevel,buzzerSwitch,filterRemainDay,resetFilterDate,cumulativeCleanAir,totalCleanAir,errorCodes, screen/child-lock preference objects.devices/vesyncpurifier.py—set_mode()now matches requested modes case-insensitively against the device's mode list before sending. Previously it lowercased camelCase modes (odorshieldbalanced), which the API rejects; this fixes mode setting for any camelCase mode while preserving validation.Testing
workModestrings on hardware; only the three odorShield modes + sleep + manual are accepted.Status
Draft while the device soak-tests in a live Home Assistant install for a few more days; will mark ready for review after that.