feat(humidifier): Add support for Levoit NeoClassic 450S (LUH-N451S-WEU) - #541
Open
HaruIjima-kun wants to merge 2 commits into
Open
feat(humidifier): Add support for Levoit NeoClassic 450S (LUH-N451S-WEU)#541HaruIjima-kun wants to merge 2 commits into
HaruIjima-kun wants to merge 2 commits into
Conversation
Adds a new HumidifierMap entry using the VeSyncSproutHumid class, as the NeoClassic 450S shares the same bypassV2 protocol and workMode values (autoPro/sleep/manual) as the Sprout Humidifier. A separate entry is used instead of adding the dev_type to the existing Sprout entry, since the NeoClassic 450S lacks drying mode, HEPA filter, child lock and external sensor support. Makes several SproutHumidifierResult fields optional with sensible defaults (autoModePreference, waterShortageDryingSwitch, childLockSwitch, filterLifePercent, hepaFilterLifePercent, lampType, dumpedState, roomSize, supportLampAct, lastDryingCompletedTime, afterDryLastHumidityTime), since the NeoClassic 450S does not report these Sprout-specific fields. Adds test fixtures for LUH-N451S-WEU in call_json_humidifiers.py and the corresponding recorded API responses. Fixes #172743
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 NeoClassic 450S humidifier (device type
LUH-N451S-WEU), which was previously silently dropped by the device map — see #172743.Details
workModevalues (autoPro/sleep/manual) as the Sprout Humidifier (LEH-B381S), so it reuses theVeSyncSproutHumidclass via a newHumidifierMapentry rather than being added to the Sprout's existingdev_types.dev_types) because the NeoClassic 450S does not have drying mode, HEPA filter, child lock, or an external humidity sensor — so itsfeatureslist only includesNIGHTLIGHT,NIGHTLIGHT_BRIGHTNESSandAUTO_STOP.SproutHumidifierResultrequired several fields the NeoClassic 450S does not report (autoModePreference,waterShortageDryingSwitch,childLockSwitch,filterLifePercent,hepaFilterLifePercent,lampType,dumpedState,roomSize,supportLampAct,lastDryingCompletedTime,afterDryLastHumidityTime). These are now optional with= 0defaults, which should not affect existing Sprout parsing.Testing
Verified against a real NeoClassic 450S account (EU region) using debug logging — confirmed the raw
deviceType(LUH-N451S-WEU) and the fullgetHumidifierStatusresponse. AddedLUH-N451S-WEUfixtures tocall_json_humidifiers.pyand generated the recorded API response via--write_api. Full test suite passes (391 passed, 3 skipped).Fixes #172743