VeSync Humidifiers↲
Contents↲
- HumidifierState Class
- VeSync 300S Humidifiers - Includes OasisMist 4.5L devices
- VeSync 200S Humidifiers - Same as 300S class with override for toggle display method
- VeSync Superior 6000S Humidifiers
- VeSync OasisMist 1000S Humidifiers
- VeSync Humidifier Base Class - Abstract base class
pyvesync.base_devices.humidifier_base.HumidifierState ↲
Bases: DeviceState
State Class for VeSync Humidifiers.
This is the state class for all vesync humidifiers. If there are
new features or state attributes, they should be added directly to
this class and be set to the default NOT_SUPPORTED
flag.
Attributes:
Name | Type | Description |
---|---|---|
auto_preference |
int
|
Auto preference level. |
auto_stop_target_reached |
bool
|
Automatic stop target reached. |
auto_target_humidity |
int
|
Target humidity level. |
automatic_stop_config |
bool
|
Automatic stop configuration. |
child_lock_status |
bool
|
Child lock status. |
display_set_status |
str
|
Display set status. |
display_status |
str
|
Display status. |
drying_mode_auto_switch |
str
|
Drying mode auto switch status. |
drying_mode_level |
int
|
Drying mode level. |
drying_mode_status |
str
|
Drying mode status. |
drying_mode_time_remain |
int
|
Drying mode time remaining. |
filter_life_percent |
int
|
Filter life percentage. |
humidity |
int
|
Current humidity level. |
humidity_high |
bool
|
High humidity status. |
mist_level |
int
|
Mist level. |
mist_virtual_level |
int
|
Mist virtual level. |
mode |
str
|
Current mode. |
nightlight_brightness |
int
|
Nightlight brightness level. |
nightlight_status |
str
|
Nightlight status. |
temperature |
int
|
Current temperature. |
warm_mist_enabled |
bool
|
Warm mist enabled status. |
warm_mist_level |
int
|
Warm mist level. |
water_lacks |
bool
|
Water lacks status. |
water_tank_lifted |
bool
|
Water tank lifted status. |
Source code in src\pyvesync\base_devices\humidifier_base.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
Attributes↲
auto_humidity
property
↲
Return the auto humidity level.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Auto humidity level. |
automatic_stop
property
↲
Return the automatic stop status.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if automatic stop is enabled, False otherwise. |
automatic_stop_target_reached
property
↲
Deprecated function.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if automatic stop target is reached, False otherwise. |
connection_status
instance-attribute
↲
Inherited From DeviceState
device_status
instance-attribute
↲
Inherited From DeviceState
drying_mode_enabled
property
↲
Return True if drying mode is enabled.
Returns:
Type | Description |
---|---|
bool
|
bool | None: True if drying mode is enabled, False otherwise. |
drying_mode_seconds_remaining
property
↲
Return the drying mode seconds remaining.
Return
int | None: Drying mode seconds remaining.
drying_mode_state
property
↲
Return the drying mode state.
Returns:
Type | Description |
---|---|
str
|
str | None: Drying mode state. |
humidity_level
property
↲
Deprecated function.
Returns:
Type | Description |
---|---|
int | None
|
int | None: Humidity level. |
target_humidity
property
↲
Return the target humidity level.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
Target humidity level. |
Functions↲
as_tuple ↲
Inherited From DeviceState
Convert state to tuple of (name, value) tuples.
display ↲
Inherited From DeviceState
Print formatted state to stdout.
to_dict ↲
Inherited From DeviceState
Convert state to dictionary.
to_json ↲
Inherited From DeviceState
Dump state to JSON string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
indent
|
bool
|
If True, indent JSON output, defaults to False. |
False
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
JSON formatted string of device state. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_jsonb ↲
Inherited From DeviceState
Convert state to JSON bytes.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
update_ts ↲
Inherited From DeviceState
Update last update timestamp.
pyvesync.devices.vesynchumidifier.VeSyncHumid200300S ↲
VeSyncHumid200300S(
details: ResponseDeviceDetailsModel,
manager: VeSync,
feature_map: HumidifierMap,
)
Bases: BypassV2Mixin
, VeSyncHumidifier
300S Humidifier Class.
Primary class for VeSync humidifier devices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
The device details. |
required |
manager
|
VeSync
|
The manager object for API calls. |
required |
feature_map
|
HumidifierMap
|
The feature map for the device. |
required |
Attributes:
Name | Type | Description |
---|---|---|
state |
HumidifierState
|
The state of the humidifier. |
last_response |
ResponseInfo
|
Last response info from API call. |
manager |
VeSync
|
Manager object for API calls. |
device_name |
str
|
Name of device. |
device_image |
str
|
URL for device image. |
cid |
str
|
Device ID. |
connection_type |
str
|
Connection type of device. |
device_type |
str
|
Type of device. |
type |
str
|
Type of device. |
uuid |
str
|
UUID of device, not always present. |
config_module |
str
|
Configuration module of device. |
mac_id |
str
|
MAC ID of device. |
current_firm_version |
str
|
Current firmware version of device. |
device_region |
str
|
Region of device. (US, EU, etc.) |
pid |
str
|
Product ID of device, pulled by some devices on update. |
sub_device_no |
int
|
Sub-device number of device. |
product_type |
str
|
Product type of device. |
features |
dict
|
Features of device. |
mist_levels |
list
|
List of mist levels. |
mist_modes |
list
|
List of mist modes. |
target_minmax |
tuple
|
Tuple of target min and max values. |
warm_mist_levels |
list
|
List of warm mist levels. |
Inherited From VeSyncHumidifier
Initialize VeSync device base class.
Initialize VeSync Humidifier Class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
The device details. |
required |
manager
|
VeSync
|
The VeSync manager. |
required |
feature_map
|
HumidifierMap
|
The feature map for the device. |
required |
Initialize 200S/300S Humidifier class.
Source code in src\pyvesync\devices\vesynchumidifier.py
Attributes↲
config_module
instance-attribute
↲
Inherited From VeSyncBaseDevice
connection_type
instance-attribute
↲
Inherited From VeSyncBaseDevice
current_firm_version
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_image
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_region
instance-attribute
↲
Inherited From VeSyncBaseDevice
firmware_update
property
↲
Inherited From VeSyncBaseDevice
Return True if firmware update available.
This is going to be updated.
last_response
instance-attribute
↲
last_response: ResponseInfo | None = None
Inherited From VeSyncBaseDevice
mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
mist_modes
instance-attribute
↲
Inherited From VeSyncHumidifier
request_keys
class-attribute
↲
request_keys: list[str] = [
'acceptLanguage',
'appVersion',
'phoneBrand',
'phoneOS',
'accountID',
'cid',
'configModule',
'debugMode',
'traceId',
'timeZone',
'token',
'userCountryCode',
'configModel',
'deviceId',
]
Inherited From BypassV2Mixin
state
instance-attribute
↲
state: HumidifierState = HumidifierState(
self, details, feature_map
)
Inherited From VeSyncBaseDevice
sub_device_no
instance-attribute
↲
Inherited From VeSyncBaseDevice
supports_drying_mode
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports drying mode.
supports_nightlight
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if nightlight is supported, False otherwise. |
supports_nightlight_brightness
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight brightness.
supports_warm_mist
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports warm mist.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if warm mist is supported, False otherwise. |
target_minmax
instance-attribute
↲
Inherited From VeSyncHumidifier
warm_mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
Functions↲
automatic_stop_off
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use turn_off_automatic_stop() instead.
Turn 200S/300S Humidifier automatic stop on.
automatic_stop_on
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use turn_on_automatic_stop() instead.
Turn 200S/300S Humidifier automatic stop on.
call_bypassv2_api
async
↲
call_bypassv2_api(
payload_method: str,
data: dict | None = None,
method: str = 'bypassV2',
endpoint: str = 'bypassV2',
) -> dict | None
Inherited From BypassV2Mixin
Send Bypass V2 API request.
This uses the _build_request
method to send API requests to the Bypass V2 API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
payload_method
|
str
|
The method to use in the payload dict. |
required |
data
|
dict | None
|
The data to send in the request. |
None
|
method
|
str
|
The method to use in the outer body. |
'bypassV2'
|
endpoint
|
str | None
|
The last part of the API url, defaults to
|
'bypassV2'
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
dict | None
|
The response from the API request. |
Source code in src\pyvesync\utils\device_mixins.py
clear_timer
async
↲
Inherited From VeSyncBaseDevice
Clear timer for device from API.
This may not be implemented for all devices. Please open an issue if there is an error.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
display ↲
Inherited From VeSyncBaseDevice
Print formatted static device info to stdout.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in display, defaults to True. |
True
|
Example:
Device Name:..................Living Room Lamp
Model:........................ESL100
Subdevice No:.................0
Type:.........................wifi
CID:..........................1234567890abcdef
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
displayJSON
deprecated
↲
Inherited From VeSyncBaseDevice
Deprecated
Use to_json() instead
Return JSON details for device. - Deprecated use to_json().
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
get_details
async
↲
Inherited From VeSyncBaseDevice
Get device details.
This method is defined in each device class to contain
the logic to pull the device state from the API and update
the device's state
attribute. The update()
method should
be called to update the device state.
Source code in src\pyvesync\devices\vesynchumidifier.py
get_state ↲
Inherited From VeSyncBaseDevice
Get device state attribute.
get_timer
async
↲
get_timer() -> Timer | None
Inherited From VeSyncBaseDevice
Get timer for device from API and set the state.Timer
attribute.
This may not be implemented for all devices. Please open an issue if there is an error.
Note
This method may not be implemented for all devices. Please open an issue if there is an error.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_auto_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Auto Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_automatic_stop
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use toggle_automatic_stop(toggle: bool) instead.
Set 200S/300S Humidifier to automatic stop.
set_display
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use toggle_display(toggle: bool) instead.
Deprecated method to toggle display on/off.
Use toggle_display(toggle: bool) instead.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_humidity
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Target Humidity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
humidity
|
int
|
Target humidity level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_humidity_mode
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use set_mode(mode: str) instead.
Deprecated method to set humidifier mode.
Use set_mode(mode: str)
instead.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_manual_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Manual Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_mist_level
async
↲
Inherited From VeSyncHumidifier
Set Mist Level for Humidifier.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
level
|
int
|
Mist level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Mist levels are defined in self.mist_levels
.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
Humidifier mode. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Modes for device are defined in self.mist_modes
.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_nightlight_brightness
async
↲
Inherited From VeSyncHumidifier
Set Humidifier night light brightness.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
brightness
|
int
|
Target night light brightness. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_sleep_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Sleep Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_state ↲
Inherited From VeSyncBaseDevice
Set device state attribute.
set_timer
async
↲
Inherited From VeSyncBaseDevice
Set timer for device.
This may not be implemented for all devices. Please open an issue if there is an error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
duration
|
int
|
Duration in seconds. |
required |
action
|
str | None
|
Action to take when timer expires. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_warm_level
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Warm Level.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
warm_level
|
int
|
Target warm level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
to_dict ↲
Inherited From VeSyncBaseDevice
Return device information as a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in dictionary, defaults to True. |
True
|
Returns:
Type | Description |
---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary containing device information. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_json ↲
Inherited From VeSyncBaseDevice
Print JSON API string for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
JSON formatted string of device details. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_jsonb ↲
Inherited From VeSyncBaseDevice
JSON API bytes for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
bytes
|
JSON formatted bytes of device details. |
Example
This is an example without state.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
toggle_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Toggle automatic stop.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to enable automatic stop, False to disable. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_display
async
↲
Inherited From VeSyncHumidifier
Toggle the display on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
True to turn on the display, False to turn off. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_drying_mode
async
↲
Inherited From VeSyncHumidifier
enable/disable drying filters after turning off.
Source code in src\pyvesync\base_devices\humidifier_base.py
toggle_switch
async
↲
Inherited From VeSyncBaseToggleDevice
Toggle device power on or off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to turn on, False to turn off, None to toggle. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
turn_off
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device off.
turn_off_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn off automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_off_display
async
↲
Inherited From VeSyncHumidifier
Turn off the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device on.
turn_on_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn on automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on_display
async
↲
Inherited From VeSyncHumidifier
Turn on the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
update
async
↲
Inherited From VeSyncBaseDevice
Update device details.
pyvesync.devices.vesynchumidifier.VeSyncHumid200S ↲
VeSyncHumid200S(
details: ResponseDeviceDetailsModel,
manager: VeSync,
feature_map: HumidifierMap,
)
Bases: VeSyncHumid200300S
Levoit Classic 200S Specific class.
Overrides the toggle_display(toggle: bool)
method of the
VeSyncHumid200300S class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
The device details. |
required |
manager
|
VeSync
|
The manager object for API calls. |
required |
feature_map
|
HumidifierMap
|
The feature map for the device. |
required |
Attributes:
Name | Type | Description |
---|---|---|
state |
HumidifierState
|
The state of the humidifier. |
last_response |
ResponseInfo
|
Last response from API call. |
manager |
VeSync
|
Manager object for API calls. |
device_name |
str
|
Name of device. |
device_image |
str
|
URL for device image. |
cid |
str
|
Device ID. |
connection_type |
str
|
Connection type of device. |
device_type |
str
|
Type of device. |
type |
str
|
Type of device. |
uuid |
str
|
UUID of device, not always present. |
config_module |
str
|
Configuration module of device. |
mac_id |
str
|
MAC ID of device. |
current_firm_version |
str
|
Current firmware version of device. |
device_region |
str
|
Region of device. (US, EU, etc.) |
pid |
str
|
Product ID of device, pulled by some devices on update. |
sub_device_no |
int
|
Sub-device number of device. |
product_type |
str
|
Product type of device. |
features |
dict
|
Features of device. |
mist_levels |
list
|
List of mist levels. |
mist_modes |
list
|
List of mist modes. |
target_minmax |
tuple
|
Tuple of target min and max values. |
warm_mist_levels |
list
|
List of warm mist levels. |
Inherited From VeSyncHumid200300S
Initialize VeSync device base class.
Initialize VeSync Humidifier Class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
The device details. |
required |
manager
|
VeSync
|
The VeSync manager. |
required |
feature_map
|
HumidifierMap
|
The feature map for the device. |
required |
Initialize 200S/300S Humidifier class.
Initialize levoit 200S device class.
This overrides the toggle_display(toggle: bool)
method of the
VeSyncHumid200300S class.
Source code in src\pyvesync\devices\vesynchumidifier.py
Attributes↲
config_module
instance-attribute
↲
Inherited From VeSyncBaseDevice
connection_type
instance-attribute
↲
Inherited From VeSyncBaseDevice
current_firm_version
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_image
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_region
instance-attribute
↲
Inherited From VeSyncBaseDevice
firmware_update
property
↲
Inherited From VeSyncBaseDevice
Return True if firmware update available.
This is going to be updated.
last_response
instance-attribute
↲
last_response: ResponseInfo | None = None
Inherited From VeSyncBaseDevice
mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
mist_modes
instance-attribute
↲
Inherited From VeSyncHumidifier
request_keys
class-attribute
↲
request_keys: list[str] = [
'acceptLanguage',
'appVersion',
'phoneBrand',
'phoneOS',
'accountID',
'cid',
'configModule',
'debugMode',
'traceId',
'timeZone',
'token',
'userCountryCode',
'configModel',
'deviceId',
]
Inherited From BypassV2Mixin
state
instance-attribute
↲
state: HumidifierState = HumidifierState(
self, details, feature_map
)
Inherited From VeSyncBaseDevice
sub_device_no
instance-attribute
↲
Inherited From VeSyncBaseDevice
supports_drying_mode
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports drying mode.
supports_nightlight
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if nightlight is supported, False otherwise. |
supports_nightlight_brightness
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight brightness.
supports_warm_mist
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports warm mist.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if warm mist is supported, False otherwise. |
target_minmax
instance-attribute
↲
Inherited From VeSyncHumidifier
warm_mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
Functions↲
automatic_stop_off
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use turn_off_automatic_stop() instead.
Turn 200S/300S Humidifier automatic stop on.
automatic_stop_on
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use turn_on_automatic_stop() instead.
Turn 200S/300S Humidifier automatic stop on.
call_bypassv2_api
async
↲
call_bypassv2_api(
payload_method: str,
data: dict | None = None,
method: str = 'bypassV2',
endpoint: str = 'bypassV2',
) -> dict | None
Inherited From BypassV2Mixin
Send Bypass V2 API request.
This uses the _build_request
method to send API requests to the Bypass V2 API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
payload_method
|
str
|
The method to use in the payload dict. |
required |
data
|
dict | None
|
The data to send in the request. |
None
|
method
|
str
|
The method to use in the outer body. |
'bypassV2'
|
endpoint
|
str | None
|
The last part of the API url, defaults to
|
'bypassV2'
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
dict | None
|
The response from the API request. |
Source code in src\pyvesync\utils\device_mixins.py
clear_timer
async
↲
Inherited From VeSyncBaseDevice
Clear timer for device from API.
This may not be implemented for all devices. Please open an issue if there is an error.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
display ↲
Inherited From VeSyncBaseDevice
Print formatted static device info to stdout.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in display, defaults to True. |
True
|
Example:
Device Name:..................Living Room Lamp
Model:........................ESL100
Subdevice No:.................0
Type:.........................wifi
CID:..........................1234567890abcdef
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
displayJSON
deprecated
↲
Inherited From VeSyncBaseDevice
Deprecated
Use to_json() instead
Return JSON details for device. - Deprecated use to_json().
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
get_details
async
↲
Inherited From VeSyncBaseDevice
Get device details.
This method is defined in each device class to contain
the logic to pull the device state from the API and update
the device's state
attribute. The update()
method should
be called to update the device state.
Source code in src\pyvesync\devices\vesynchumidifier.py
get_state ↲
Inherited From VeSyncBaseDevice
Get device state attribute.
get_timer
async
↲
get_timer() -> Timer | None
Inherited From VeSyncBaseDevice
Get timer for device from API and set the state.Timer
attribute.
This may not be implemented for all devices. Please open an issue if there is an error.
Note
This method may not be implemented for all devices. Please open an issue if there is an error.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_auto_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Auto Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_automatic_stop
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use toggle_automatic_stop(toggle: bool) instead.
Set 200S/300S Humidifier to automatic stop.
set_display
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use toggle_display(toggle: bool) instead.
Deprecated method to toggle display on/off.
Use toggle_display(toggle: bool) instead.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_humidity
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Target Humidity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
humidity
|
int
|
Target humidity level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_humidity_mode
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use set_mode(mode: str) instead.
Deprecated method to set humidifier mode.
Use set_mode(mode: str)
instead.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_manual_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Manual Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_mist_level
async
↲
Inherited From VeSyncHumidifier
Set Mist Level for Humidifier.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
level
|
int
|
Mist level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Mist levels are defined in self.mist_levels
.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
Humidifier mode. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Modes for device are defined in self.mist_modes
.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_nightlight_brightness
async
↲
Inherited From VeSyncHumidifier
Set Humidifier night light brightness.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
brightness
|
int
|
Target night light brightness. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_sleep_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Sleep Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_state ↲
Inherited From VeSyncBaseDevice
Set device state attribute.
set_timer
async
↲
Inherited From VeSyncBaseDevice
Set timer for device.
This may not be implemented for all devices. Please open an issue if there is an error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
duration
|
int
|
Duration in seconds. |
required |
action
|
str | None
|
Action to take when timer expires. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_warm_level
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Warm Level.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
warm_level
|
int
|
Target warm level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
to_dict ↲
Inherited From VeSyncBaseDevice
Return device information as a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in dictionary, defaults to True. |
True
|
Returns:
Type | Description |
---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary containing device information. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_json ↲
Inherited From VeSyncBaseDevice
Print JSON API string for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
JSON formatted string of device details. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_jsonb ↲
Inherited From VeSyncBaseDevice
JSON API bytes for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
bytes
|
JSON formatted bytes of device details. |
Example
This is an example without state.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
toggle_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Toggle automatic stop.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to enable automatic stop, False to disable. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_display
async
↲
Inherited From VeSyncHumid200300S
Toggle the display on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
True to turn on the display, False to turn off. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_drying_mode
async
↲
Inherited From VeSyncHumidifier
enable/disable drying filters after turning off.
Source code in src\pyvesync\base_devices\humidifier_base.py
toggle_switch
async
↲
Inherited From VeSyncBaseToggleDevice
Toggle device power on or off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to turn on, False to turn off, None to toggle. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
turn_off
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device off.
turn_off_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn off automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_off_display
async
↲
Inherited From VeSyncHumidifier
Turn off the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device on.
turn_on_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn on automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on_display
async
↲
Inherited From VeSyncHumidifier
Turn on the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
update
async
↲
Inherited From VeSyncBaseDevice
Update device details.
pyvesync.devices.vesynchumidifier.VeSyncSuperior6000S ↲
VeSyncSuperior6000S(
details: ResponseDeviceDetailsModel,
manager: VeSync,
feature_map: HumidifierMap,
)
Bases: BypassV2Mixin
, VeSyncHumidifier
Superior 6000S Humidifier.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
The device details. |
required |
manager
|
VeSync
|
The manager object for API calls. |
required |
feature_map
|
HumidifierMap
|
The feature map for the device. |
required |
Attributes:
Name | Type | Description |
---|---|---|
state |
HumidifierState
|
The state of the humidifier. |
last_response |
ResponseInfo
|
Last response from API call. |
manager |
VeSync
|
Manager object for API calls. |
device_name |
str
|
Name of device. |
device_image |
str
|
URL for device image. |
cid |
str
|
Device ID. |
connection_type |
str
|
Connection type of device. |
device_type |
str
|
Type of device. |
type |
str
|
Type of device. |
uuid |
str
|
UUID of device, not always present. |
config_module |
str
|
Configuration module of device. |
mac_id |
str
|
MAC ID of device. |
current_firm_version |
str
|
Current firmware version of device. |
device_region |
str
|
Region of device. (US, EU, etc.) |
pid |
str
|
Product ID of device, pulled by some devices on update. |
sub_device_no |
int
|
Sub-device number of device. |
product_type |
str
|
Product type of device. |
features |
dict
|
Features of device. |
mist_levels |
list
|
List of mist levels. |
mist_modes |
list
|
List of mist modes. |
target_minmax |
tuple
|
Tuple of target min and max values. |
warm_mist_levels |
list
|
List of warm mist levels. |
Inherited From VeSyncHumidifier
Initialize VeSync device base class.
Initialize VeSync Humidifier Class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
The device details. |
required |
manager
|
VeSync
|
The VeSync manager. |
required |
feature_map
|
HumidifierMap
|
The feature map for the device. |
required |
Initialize Superior 6000S Humidifier class.
Source code in src\pyvesync\devices\vesynchumidifier.py
Attributes↲
config_module
instance-attribute
↲
Inherited From VeSyncBaseDevice
connection_type
instance-attribute
↲
Inherited From VeSyncBaseDevice
current_firm_version
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_image
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_region
instance-attribute
↲
Inherited From VeSyncBaseDevice
firmware_update
property
↲
Inherited From VeSyncBaseDevice
Return True if firmware update available.
This is going to be updated.
last_response
instance-attribute
↲
last_response: ResponseInfo | None = None
Inherited From VeSyncBaseDevice
mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
mist_modes
instance-attribute
↲
Inherited From VeSyncHumidifier
request_keys
class-attribute
↲
request_keys: list[str] = [
'acceptLanguage',
'appVersion',
'phoneBrand',
'phoneOS',
'accountID',
'cid',
'configModule',
'debugMode',
'traceId',
'timeZone',
'token',
'userCountryCode',
'configModel',
'deviceId',
]
Inherited From BypassV2Mixin
state
instance-attribute
↲
state: HumidifierState = HumidifierState(
self, details, feature_map
)
Inherited From VeSyncBaseDevice
sub_device_no
instance-attribute
↲
Inherited From VeSyncBaseDevice
supports_drying_mode
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports drying mode.
supports_nightlight
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if nightlight is supported, False otherwise. |
supports_nightlight_brightness
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight brightness.
supports_warm_mist
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports warm mist.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if warm mist is supported, False otherwise. |
target_minmax
instance-attribute
↲
Inherited From VeSyncHumidifier
warm_mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
Functions↲
call_bypassv2_api
async
↲
call_bypassv2_api(
payload_method: str,
data: dict | None = None,
method: str = 'bypassV2',
endpoint: str = 'bypassV2',
) -> dict | None
Inherited From BypassV2Mixin
Send Bypass V2 API request.
This uses the _build_request
method to send API requests to the Bypass V2 API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
payload_method
|
str
|
The method to use in the payload dict. |
required |
data
|
dict | None
|
The data to send in the request. |
None
|
method
|
str
|
The method to use in the outer body. |
'bypassV2'
|
endpoint
|
str | None
|
The last part of the API url, defaults to
|
'bypassV2'
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
dict | None
|
The response from the API request. |
Source code in src\pyvesync\utils\device_mixins.py
clear_timer
async
↲
Inherited From VeSyncBaseDevice
Clear timer for device from API.
This may not be implemented for all devices. Please open an issue if there is an error.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
display ↲
Inherited From VeSyncBaseDevice
Print formatted static device info to stdout.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in display, defaults to True. |
True
|
Example:
Device Name:..................Living Room Lamp
Model:........................ESL100
Subdevice No:.................0
Type:.........................wifi
CID:..........................1234567890abcdef
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
displayJSON
deprecated
↲
Inherited From VeSyncBaseDevice
Deprecated
Use to_json() instead
Return JSON details for device. - Deprecated use to_json().
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
get_details
async
↲
Inherited From VeSyncBaseDevice
Get device details.
This method is defined in each device class to contain
the logic to pull the device state from the API and update
the device's state
attribute. The update()
method should
be called to update the device state.
Source code in src\pyvesync\devices\vesynchumidifier.py
get_state ↲
Inherited From VeSyncBaseDevice
Get device state attribute.
get_timer
async
↲
get_timer() -> Timer | None
Inherited From VeSyncBaseDevice
Get timer for device from API and set the state.Timer
attribute.
This may not be implemented for all devices. Please open an issue if there is an error.
Note
This method may not be implemented for all devices. Please open an issue if there is an error.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
set_auto_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Auto Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_display_enabled
async
deprecated
↲
Deprecated
Use toggle_display() instead.
Set display on/off.
Deprecated method, please use toggle_display() instead.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_drying_mode_enabled
async
deprecated
↲
Deprecated
Use toggle_drying_mode() instead.
Set drying mode on/off.
set_humidity
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Target Humidity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
humidity
|
int
|
Target humidity level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_humidity_mode
async
deprecated
↲
set_manual_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Manual Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_mist_level
async
↲
Inherited From VeSyncHumidifier
Set Mist Level for Humidifier.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
level
|
int
|
Mist level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Mist levels are defined in self.mist_levels
.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
Humidifier mode. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Modes for device are defined in self.mist_modes
.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_nightlight_brightness
async
↲
Inherited From VeSyncHumidifier
Set Humidifier night light brightness.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
brightness
|
int
|
Target night light brightness. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_sleep_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Sleep Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_state ↲
Inherited From VeSyncBaseDevice
Set device state attribute.
set_timer
async
↲
Inherited From VeSyncBaseDevice
Set timer for device.
This may not be implemented for all devices. Please open an issue if there is an error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
duration
|
int
|
Duration in seconds. |
required |
action
|
str | None
|
Action to take when timer expires. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
set_warm_level
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Warm Level.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
warm_level
|
int
|
Target warm level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
to_dict ↲
Inherited From VeSyncBaseDevice
Return device information as a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in dictionary, defaults to True. |
True
|
Returns:
Type | Description |
---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary containing device information. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_json ↲
Inherited From VeSyncBaseDevice
Print JSON API string for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
JSON formatted string of device details. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_jsonb ↲
Inherited From VeSyncBaseDevice
JSON API bytes for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
bytes
|
JSON formatted bytes of device details. |
Example
This is an example without state.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
toggle_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Toggle automatic stop.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to enable automatic stop, False to disable. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_display
async
↲
Inherited From VeSyncHumidifier
Toggle the display on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
True to turn on the display, False to turn off. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_drying_mode
async
↲
Inherited From VeSyncHumidifier
enable/disable drying filters after turning off.
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_switch
async
↲
Inherited From VeSyncBaseToggleDevice
Toggle device power on or off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to turn on, False to turn off, None to toggle. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
turn_off
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device off.
turn_off_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn off automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_off_display
async
↲
Inherited From VeSyncHumidifier
Turn off the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device on.
turn_on_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn on automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on_display
async
↲
Inherited From VeSyncHumidifier
Turn on the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
update
async
↲
Inherited From VeSyncBaseDevice
Update device details.
pyvesync.devices.vesynchumidifier.VeSyncHumid1000S ↲
VeSyncHumid1000S(
details: ResponseDeviceDetailsModel,
manager: VeSync,
feature_map: HumidifierMap,
)
Bases: VeSyncHumid200300S
Levoit OasisMist 1000S Specific class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
The device details. |
required |
manager
|
VeSync
|
The manager object for API calls. |
required |
feature_map
|
HumidifierMap
|
The feature map for the device. |
required |
Attributes:
Name | Type | Description |
---|---|---|
state |
HumidifierState
|
The state of the humidifier. |
last_response |
ResponseInfo
|
Last response from API call. |
manager |
VeSync
|
Manager object for API calls. |
device_name |
str
|
Name of device. |
device_image |
str
|
URL for device image. |
cid |
str
|
Device ID. |
connection_type |
str
|
Connection type of device. |
device_type |
str
|
Type of device. |
type |
str
|
Type of device. |
uuid |
str
|
UUID of device, not always present. |
config_module |
str
|
Configuration module of device. |
mac_id |
str
|
MAC ID of device. |
current_firm_version |
str
|
Current firmware version of device. |
device_region |
str
|
Region of device. (US, EU, etc.) |
pid |
str
|
Product ID of device, pulled by some devices on update. |
sub_device_no |
int
|
Sub-device number of device. |
product_type |
str
|
Product type of device. |
features |
dict
|
Features of device. |
mist_levels |
list
|
List of mist levels. |
mist_modes |
list
|
List of mist modes. |
target_minmax |
tuple
|
Tuple of target min and max values. |
warm_mist_levels |
list
|
List of warm mist levels. |
Inherited From VeSyncHumid200300S
Initialize VeSync device base class.
Initialize VeSync Humidifier Class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
The device details. |
required |
manager
|
VeSync
|
The VeSync manager. |
required |
feature_map
|
HumidifierMap
|
The feature map for the device. |
required |
Initialize 200S/300S Humidifier class.
Initialize levoit 1000S device class.
Source code in src\pyvesync\devices\vesynchumidifier.py
Attributes↲
config_module
instance-attribute
↲
Inherited From VeSyncBaseDevice
connection_type
instance-attribute
↲
Inherited From VeSyncBaseDevice
current_firm_version
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_image
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_region
instance-attribute
↲
Inherited From VeSyncBaseDevice
firmware_update
property
↲
Inherited From VeSyncBaseDevice
Return True if firmware update available.
This is going to be updated.
last_response
instance-attribute
↲
last_response: ResponseInfo | None = None
Inherited From VeSyncBaseDevice
mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
mist_modes
instance-attribute
↲
Inherited From VeSyncHumidifier
request_keys
class-attribute
↲
request_keys: list[str] = [
'acceptLanguage',
'appVersion',
'phoneBrand',
'phoneOS',
'accountID',
'cid',
'configModule',
'debugMode',
'traceId',
'timeZone',
'token',
'userCountryCode',
'configModel',
'deviceId',
]
Inherited From BypassV2Mixin
state
instance-attribute
↲
state: HumidifierState = HumidifierState(
self, details, feature_map
)
Inherited From VeSyncBaseDevice
sub_device_no
instance-attribute
↲
Inherited From VeSyncBaseDevice
supports_drying_mode
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports drying mode.
supports_nightlight
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if nightlight is supported, False otherwise. |
supports_nightlight_brightness
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight brightness.
supports_warm_mist
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports warm mist.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if warm mist is supported, False otherwise. |
target_minmax
instance-attribute
↲
Inherited From VeSyncHumidifier
warm_mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
Functions↲
automatic_stop_off
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use turn_off_automatic_stop() instead.
Turn 200S/300S Humidifier automatic stop on.
automatic_stop_on
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use turn_on_automatic_stop() instead.
Turn 200S/300S Humidifier automatic stop on.
call_bypassv2_api
async
↲
call_bypassv2_api(
payload_method: str,
data: dict | None = None,
method: str = 'bypassV2',
endpoint: str = 'bypassV2',
) -> dict | None
Inherited From BypassV2Mixin
Send Bypass V2 API request.
This uses the _build_request
method to send API requests to the Bypass V2 API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
payload_method
|
str
|
The method to use in the payload dict. |
required |
data
|
dict | None
|
The data to send in the request. |
None
|
method
|
str
|
The method to use in the outer body. |
'bypassV2'
|
endpoint
|
str | None
|
The last part of the API url, defaults to
|
'bypassV2'
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
dict | None
|
The response from the API request. |
Source code in src\pyvesync\utils\device_mixins.py
clear_timer
async
↲
Inherited From VeSyncBaseDevice
Clear timer for device from API.
This may not be implemented for all devices. Please open an issue if there is an error.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
display ↲
Inherited From VeSyncBaseDevice
Print formatted static device info to stdout.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in display, defaults to True. |
True
|
Example:
Device Name:..................Living Room Lamp
Model:........................ESL100
Subdevice No:.................0
Type:.........................wifi
CID:..........................1234567890abcdef
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
displayJSON
deprecated
↲
Inherited From VeSyncBaseDevice
Deprecated
Use to_json() instead
Return JSON details for device. - Deprecated use to_json().
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
get_details
async
↲
Inherited From VeSyncHumid200300S
Get device details.
This method is defined in each device class to contain
the logic to pull the device state from the API and update
the device's state
attribute. The update()
method should
be called to update the device state.
Source code in src\pyvesync\devices\vesynchumidifier.py
get_state ↲
Inherited From VeSyncBaseDevice
Get device state attribute.
get_timer
async
↲
get_timer() -> Timer | None
Inherited From VeSyncBaseDevice
Get timer for device from API and set the state.Timer
attribute.
This may not be implemented for all devices. Please open an issue if there is an error.
Note
This method may not be implemented for all devices. Please open an issue if there is an error.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_auto_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Auto Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_automatic_stop
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use toggle_automatic_stop() instead.
set_display
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use toggle_switch() instead.
Toggle display on/off.
This is a deprecated method, please use toggle_display() instead.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_humidity
async
↲
Inherited From VeSyncHumid200300S
Set Humidifier Target Humidity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
humidity
|
int
|
Target humidity level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_humidity_mode
async
deprecated
↲
Inherited From VeSyncHumid200300S
Deprecated
Use set_mode() instead.
Set humidifier mode - sleep, auto or manual.
Deprecated, please use set_mode() instead.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_manual_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Manual Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_mist_level
async
↲
Inherited From VeSyncHumid200300S
Set Mist Level for Humidifier.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
level
|
int
|
Mist level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Mist levels are defined in self.mist_levels
.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_mode
async
↲
Inherited From VeSyncHumid200300S
Set Humidifier Mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
Humidifier mode. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Modes for device are defined in self.mist_modes
.
Source code in src\pyvesync\devices\vesynchumidifier.py
set_nightlight_brightness
async
↲
Inherited From VeSyncHumidifier
Set Humidifier night light brightness.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
brightness
|
int
|
Target night light brightness. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_sleep_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Sleep Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_state ↲
Inherited From VeSyncBaseDevice
Set device state attribute.
set_timer
async
↲
Inherited From VeSyncBaseDevice
Set timer for device.
This may not be implemented for all devices. Please open an issue if there is an error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
duration
|
int
|
Duration in seconds. |
required |
action
|
str | None
|
Action to take when timer expires. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
set_warm_level
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Warm Level.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
warm_level
|
int
|
Target warm level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
to_dict ↲
Inherited From VeSyncBaseDevice
Return device information as a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in dictionary, defaults to True. |
True
|
Returns:
Type | Description |
---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary containing device information. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_json ↲
Inherited From VeSyncBaseDevice
Print JSON API string for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
JSON formatted string of device details. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_jsonb ↲
Inherited From VeSyncBaseDevice
JSON API bytes for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
bytes
|
JSON formatted bytes of device details. |
Example
This is an example without state.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
toggle_automatic_stop
async
↲
Inherited From VeSyncHumid200300S
Toggle automatic stop.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to enable automatic stop, False to disable. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_display
async
↲
Inherited From VeSyncHumid200300S
Toggle the display on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
True to turn on the display, False to turn off. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\devices\vesynchumidifier.py
toggle_drying_mode
async
↲
Inherited From VeSyncHumidifier
enable/disable drying filters after turning off.
Source code in src\pyvesync\base_devices\humidifier_base.py
toggle_switch
async
↲
Inherited From VeSyncHumid200300S
Toggle device power on or off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to turn on, False to turn off, None to toggle. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\devices\vesynchumidifier.py
turn_off
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device off.
turn_off_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn off automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_off_display
async
↲
Inherited From VeSyncHumidifier
Turn off the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device on.
turn_on_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn on automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on_display
async
↲
Inherited From VeSyncHumidifier
Turn on the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
update
async
↲
Inherited From VeSyncBaseDevice
Update device details.
pyvesync.base_devices.humidifier_base.VeSyncHumidifier ↲
Bases: VeSyncBaseToggleDevice
VeSyncHumdifier Base Class.
This is the base device to be inherited by all Humidifier devices. This class only holds the device configuration and static attributes. The state attribute holds the current state.
Attributes:
Name | Type | Description |
---|---|---|
state |
HumidifierState
|
The state of the humidifier. |
last_response |
ResponseInfo
|
Last response from API call. |
manager |
VeSync
|
Manager object for API calls. |
device_name |
str
|
Name of device. |
device_image |
str
|
URL for device image. |
cid |
str
|
Device ID. |
connection_type |
str
|
Connection type of device. |
device_type |
str
|
Type of device. |
type |
str
|
Type of device. |
uuid |
str
|
UUID of device, not always present. |
config_module |
str
|
Configuration module of device. |
mac_id |
str
|
MAC ID of device. |
current_firm_version |
str
|
Current firmware version of device. |
device_region |
str
|
Region of device. (US, EU, etc.) |
pid |
str
|
Product ID of device, pulled by some devices on update. |
sub_device_no |
int
|
Sub-device number of device. |
product_type |
str
|
Product type of device. |
features |
dict
|
Features of device. |
mist_levels |
list
|
List of mist levels. |
mist_modes |
list
|
List of mist modes. |
target_minmax |
tuple
|
Tuple of target min and max values. |
warm_mist_levels |
list
|
List of warm mist levels. |
Source code in src\pyvesync\base_devices\humidifier_base.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
Attributes↲
config_module
instance-attribute
↲
Inherited From VeSyncBaseDevice
connection_type
instance-attribute
↲
Inherited From VeSyncBaseDevice
current_firm_version
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_image
instance-attribute
↲
Inherited From VeSyncBaseDevice
device_region
instance-attribute
↲
Inherited From VeSyncBaseDevice
firmware_update
property
↲
Inherited From VeSyncBaseDevice
Return True if firmware update available.
This is going to be updated.
last_response
instance-attribute
↲
last_response: ResponseInfo | None = None
Inherited From VeSyncBaseDevice
mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
mist_modes
instance-attribute
↲
Inherited From VeSyncHumidifier
state
instance-attribute
↲
state: HumidifierState = HumidifierState(
self, details, feature_map
)
Inherited From VeSyncBaseDevice
sub_device_no
instance-attribute
↲
Inherited From VeSyncBaseDevice
supports_drying_mode
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports drying mode.
supports_nightlight
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if nightlight is supported, False otherwise. |
supports_nightlight_brightness
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports nightlight brightness.
supports_warm_mist
property
↲
Inherited From VeSyncHumidifier
Return True if the humidifier supports warm mist.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if warm mist is supported, False otherwise. |
target_minmax
instance-attribute
↲
Inherited From VeSyncHumidifier
warm_mist_levels
instance-attribute
↲
Inherited From VeSyncHumidifier
Functions↲
clear_timer
async
↲
Inherited From VeSyncBaseDevice
Clear timer for device from API.
This may not be implemented for all devices. Please open an issue if there is an error.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
display ↲
Inherited From VeSyncBaseDevice
Print formatted static device info to stdout.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in display, defaults to True. |
True
|
Example:
Device Name:..................Living Room Lamp
Model:........................ESL100
Subdevice No:.................0
Type:.........................wifi
CID:..........................1234567890abcdef
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
displayJSON
deprecated
↲
Inherited From VeSyncBaseDevice
Deprecated
Use to_json() instead
Return JSON details for device. - Deprecated use to_json().
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
get_details
abstractmethod
async
↲
Inherited From VeSyncBaseDevice
Get device details.
This method is defined in each device class to contain
the logic to pull the device state from the API and update
the device's state
attribute. The update()
method should
be called to update the device state.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
get_state ↲
Inherited From VeSyncBaseDevice
Get device state attribute.
get_timer
async
↲
get_timer() -> Timer | None
Inherited From VeSyncBaseDevice
Get timer for device from API and set the state.Timer
attribute.
This may not be implemented for all devices. Please open an issue if there is an error.
Note
This method may not be implemented for all devices. Please open an issue if there is an error.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
set_auto_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Auto Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_humidity
async
↲
Set Humidifier Target Humidity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
humidity
|
int
|
Target humidity level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_manual_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Manual Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_mist_level
abstractmethod
async
↲
Set Mist Level for Humidifier.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
level
|
int
|
Mist level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Mist levels are defined in self.mist_levels
.
Source code in src\pyvesync\base_devices\humidifier_base.py
set_mode
abstractmethod
async
↲
Set Humidifier Mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
Humidifier mode. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
Modes for device are defined in self.mist_modes
.
Source code in src\pyvesync\base_devices\humidifier_base.py
set_nightlight_brightness
async
↲
Inherited From VeSyncHumidifier
Set Humidifier night light brightness.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
brightness
|
int
|
Target night light brightness. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_sleep_mode
async
↲
Inherited From VeSyncHumidifier
Set Humidifier to Sleep Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
set_state ↲
Inherited From VeSyncBaseDevice
Set device state attribute.
set_timer
async
↲
Inherited From VeSyncBaseDevice
Set timer for device.
This may not be implemented for all devices. Please open an issue if there is an error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
duration
|
int
|
Duration in seconds. |
required |
action
|
str | None
|
Action to take when timer expires. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
set_warm_level
async
↲
Inherited From VeSyncHumidifier
Set Humidifier Warm Level.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
warm_level
|
int
|
Target warm level. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
to_dict ↲
Inherited From VeSyncBaseDevice
Return device information as a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in dictionary, defaults to True. |
True
|
Returns:
Type | Description |
---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary containing device information. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_json ↲
Inherited From VeSyncBaseDevice
Print JSON API string for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
JSON formatted string of device details. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
to_jsonb ↲
Inherited From VeSyncBaseDevice
JSON API bytes for device details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
bool
|
If True, include state in JSON output, defaults to True. |
True
|
indent
|
bool
|
If True, indent JSON output, defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
bytes |
bytes
|
JSON formatted bytes of device details. |
Example
This is an example without state.
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
toggle_automatic_stop
async
↲
Toggle automatic stop.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to enable automatic stop, False to disable. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
toggle_display
async
↲
Toggle the display on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
True to turn on the display, False to turn off. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\humidifier_base.py
toggle_drying_mode
async
↲
Inherited From VeSyncHumidifier
enable/disable drying filters after turning off.
Source code in src\pyvesync\base_devices\humidifier_base.py
toggle_switch
abstractmethod
async
↲
Inherited From VeSyncBaseToggleDevice
Toggle device power on or off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool | None
|
True to turn on, False to turn off, None to toggle. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src\pyvesync\base_devices\vesyncbasedevice.py
turn_off
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device off.
turn_off_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn off automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_off_display
async
↲
Inherited From VeSyncHumidifier
Turn off the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device on.
turn_on_automatic_stop
async
↲
Inherited From VeSyncHumidifier
Turn on automatic stop.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
turn_on_display
async
↲
Inherited From VeSyncHumidifier
Turn on the display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
update
async
↲
Inherited From VeSyncBaseDevice
Update device details.