Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ pip install pyvesync
6. OasisMist 1000S
7. Superior 6000S
8. Sprout Humidifier
9. NeoClassic 450S

### Levoit Fans

Expand Down
19 changes: 19 additions & 0 deletions src/pyvesync/device_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,25 @@ class ThermostatMap(DeviceMapTemplate):
model_name='Sprout Humidifier',
setup_entry='LEH-B381S',
),
HumidifierMap(
class_name='VeSyncSproutHumid',
dev_types=['LUH-N451S-WEU'],
features=[
HumidifierFeatures.NIGHTLIGHT,
HumidifierFeatures.NIGHTLIGHT_BRIGHTNESS,
HumidifierFeatures.AUTO_STOP,
],
mist_modes={
HumidifierModes.AUTO: 'autoPro',
HumidifierModes.SLEEP: 'sleep',
HumidifierModes.MANUAL: 'manual',
},
mist_levels=list(range(1, 3)),
device_alias='NeoClassic 450S',
model_display='LUH-N451S Series',
model_name='NeoClassic 450S',
setup_entry='LUH-N451S-WEU',
),
]
"""List of ['HumidifierMap'][pyvesync.device_map.HumidifierMap] configuration
objects for humidifier devices."""
Expand Down
22 changes: 11 additions & 11 deletions src/pyvesync/models/humidifier_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,20 +242,20 @@ class SproutHumidifierResult(InnerHumidifierBaseResult):
autoStopState: int
screenSwitch: int
screenState: int
autoModePreference: int
autoPreference: int
waterShortageDryingSwitch: int
childLockSwitch: int
filterLifePercent: int
hepaFilterLifePercent: int
temperature: int
lampSwitch: int
lampType: int
dumpedState: int
roomSize: int
supportLampAct: int
lastDryingCompletedTime: int
afterDryLastHumidityTime: int
autoModePreference: int = 0
waterShortageDryingSwitch: int = 0
childLockSwitch: int = 0
filterLifePercent: int = 0
hepaFilterLifePercent: int = 0
lampType: int = 0
dumpedState: int = 0
roomSize: int = 0
supportLampAct: int = 0
lastDryingCompletedTime: int = 0
afterDryLastHumidityTime: int = 0
sensorContent: SproutSensorcontent | None = None
breathingLamp: SproutBreathinglamp | None = None
guardingInfo: SproutGuardinginfo | None = None
Expand Down
300 changes: 300 additions & 0 deletions src/tests/api/vesynchumidifier/LUH-N451S-WEU.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
set_auto_mode:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
workMode: autoPro
method: setHumidityMode
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
set_humidity:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
targetHumidity: 50
method: setTargetHumidity
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
set_manual_mode:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
workMode: manual
method: setHumidityMode
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
set_mist_level:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
levelIdx: 0
levelType: mist
virtualLevel: 2
method: setVirtualLevel
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
turn_off:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
powerSwitch: 0
switchIdx: 0
method: setSwitch
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
turn_off_automatic_stop:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
autoStopSwitch: 0
method: setAutoStopSwitch
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
turn_off_display:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
screenSwitch: 0
method: setDisplay
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
turn_on:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
powerSwitch: 1
switchIdx: 0
method: setSwitch
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
turn_on_automatic_stop:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
autoStopSwitch: 1
method: setAutoStopSwitch
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
turn_on_display:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data:
screenSwitch: 1
method: setDisplay
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
update:
headers:
Content-Type: application/json; charset=UTF-8
User-Agent: okhttp/3.12.1
json_object:
acceptLanguage: en
accountID: sample_id
appVersion: 5.6.60
cid: LUH-N451S-WEU-CID
configModel: ConfigModule
configModule: ConfigModule
debugMode: false
deviceId: LUH-N451S-WEU-CID
method: bypassV2
payload:
data: {}
method: getHumidifierStatus
source: APP
phoneBrand: pyvesync
phoneOS: Android
timeZone: America/New_York
token: sample_tk
traceId: TRACE_ID
userCountryCode: US
method: post
url: /cloud/v2/deviceManaged/bypassV2
Loading