Skip to content
Draft
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
20 changes: 11 additions & 9 deletions docs/supported_devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The VeSync API supports a variety of devices. The following is a list of devices
- [OasisMist 1000S Humidifier][pyvesync.devices.vesynchumidifier.VeSyncHumid1000S]
- [Superior 6000S][pyvesync.devices.vesynchumidifier.VeSyncSuperior6000S] - 6L Smart Humidifier
- [Sprout Humidifier][pyvesync.devices.vesynchumidifier.VeSyncSproutHumid]
- [NeoClassic 650s][pyvesync.devices.vesynchumidifier.NeoClassic650s] - 6L Smart Humidifier
6. Fans
- [42" Tower Fan][pyvesync.devices.vesyncfan.VeSyncTowerFan]
- [Pedestal Fan][pyvesync.devices.vesyncfan.VeSyncPedestalFan]
Expand Down Expand Up @@ -91,15 +92,16 @@ these methods are used.

### Humidifiers

| Device Name | Night Light | RGB Night Light | Warm Mist |
| ------ | ----- | ----- | ----- |
| Classic 200S | | | |
| Classic 300S | ✔ | | ✔ |
| Dual 200S | | | |
| LV600S | | | ✔ |
| OasisMist 4.5L | | ✔ | ✔ |
| Superior 6000S | | | ✔ |
| Sprout Humidifier | | | |
| Device Name | Nightlight | RGB Nightlight | Warm Mist | Nightlight Color Temp |
| ------ | ----- | ----- | ----- | |
| Classic 200S | | | | |
| Classic 300S | ✔ | | ✔ | |
| Dual 200S | | | | |
| LV600S | | | ✔ | |
| OasisMist 4.5L | | ✔ | ✔ | |
| Superior 6000S | | | ✔ | |
| Sprout Humidifier | | | | |
| NeoClassic 650s | ✔ | | | ✔ |

The OasisMist 4.5L (`LUH-O451S-WEU`) exposes an RGB nightlight through
[`set_rgb_nightlight`][pyvesync.devices.vesynchumidifier.VeSyncHumid200300S.set_rgb_nightlight].
Expand Down
5 changes: 5 additions & 0 deletions src/pyvesync/base_devices/humidifier_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ def supports_nightlight_brightness(self) -> bool:
"""Return True if the humidifier supports nightlight brightness."""
return HumidifierFeatures.NIGHTLIGHT_BRIGHTNESS in self.features

@property
def supports_nightlight_color_temp(self) -> bool:
"""Return True if the humidifier supports nightlight brightness."""
return HumidifierFeatures.NIGHTLIGHT_COLOR_TEMP in self.features

@property
def supports_rgb_nightlight(self) -> bool:
"""Return True if the humidifier supports RGB nightlight.
Expand Down
23 changes: 22 additions & 1 deletion src/pyvesync/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ class HumidifierFeatures(Features):
AUTO_STOP: Auto stop when target humidity is reached.
Different from auto, which adjusts fan level to maintain humidity.
RGB_NIGHTLIGHT: RGB nightlight with color control.
NIGHTLIGHT_COLOR_TEMP: Color Temperature of the Nightlight
"""

ONOFF = 'onoff'
Expand All @@ -513,6 +514,7 @@ class HumidifierFeatures(Features):
NIGHTLIGHT_BRIGHTNESS = 'nightlight_brightness'
DRYING_MODE = 'drying_mode'
RGB_NIGHTLIGHT = 'rgb_nightlight'
NIGHTLIGHT_COLOR_TEMP = 'night_light_color_temperature'


class PurifierFeatures(Features):
Expand Down Expand Up @@ -652,7 +654,6 @@ class HumidifierModes(Features):
TURBO: Turbo mode.
PET: Pet mode.
UNKNOWN: Unknown mode.
AUTOPRO: AutoPro mode.
"""

AUTO = 'auto'
Expand Down Expand Up @@ -925,3 +926,23 @@ def __int__(self) -> int:
DryingModes.RUNNING: 1,
DryingModes.PAUSE: 2,
}


class HumidifierAutoPreference(IntEnum):
"""Preference Levels for Humidifier Auto Mode.

Attributes:
SMART: Smart preference level.
TURBO: Turbo preference level.
MODERATE: Moderate preference level.
GENTLE: Gentle preference level.
"""

SMART = 3
TURBO = 5
MODERATE = 6
GENTLE = 7

def __str__(self) -> str:
"""Return string representation of the enum."""
return self.name.capitalize()
30 changes: 30 additions & 0 deletions src/pyvesync/device_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
FanFeatures,
FanModes,
FanSleepPreference,
HumidifierAutoPreference,
HumidifierFeatures,
HumidifierModes,
NightlightModes,
Expand Down Expand Up @@ -278,6 +279,7 @@ class HumidifierMap(DeviceMapTemplate):
module: ModuleType = vesynchumidifier
target_minmax: tuple[int, int] = (30, 80)
warm_mist_levels: list[int] = field(default_factory=list)
auto_preferences: list[HumidifierAutoPreference] = field(default_factory=list)


@dataclass(kw_only=True)
Expand Down Expand Up @@ -809,6 +811,34 @@ class ThermostatMap(DeviceMapTemplate):
model_name='Sprout Humidifier',
setup_entry='LEH-B381S',
),
HumidifierMap(
class_name='NeoClassic650s',
dev_types=['LUH-N651S-WUS'],
features=[
HumidifierFeatures.ONOFF,
HumidifierFeatures.AUTO_STOP,
HumidifierFeatures.NIGHTLIGHT,
HumidifierFeatures.NIGHTLIGHT_BRIGHTNESS,
HumidifierFeatures.NIGHTLIGHT_COLOR_TEMP,
],
mist_modes={
HumidifierModes.AUTO: 'autoPro',
HumidifierModes.SLEEP: 'sleep',
HumidifierModes.MANUAL: 'manual',
},
mist_levels=list(range(1, 6)),
auto_preferences=[
HumidifierAutoPreference.SMART,
HumidifierAutoPreference.TURBO,
HumidifierAutoPreference.MODERATE,
HumidifierAutoPreference.GENTLE,
],
device_alias='NeoClassic 650s',
model_display='LUH-N651S Series',
model_name='NeoClassic 650s',
setup_entry='LUH-N651S-WUS',
target_minmax=(20, 90),
),
]
"""List of ['HumidifierMap'][pyvesync.device_map.HumidifierMap] configuration
objects for humidifier devices."""
Expand Down
Loading