VeSync Fans (NOT Purifiers or Humidifiers)↲
pyvesync.base_devices.fan_base.FanState ↲
Bases: DeviceState
Base state class for Purifiers.
Not all attributes are supported by all devices. Attributes are set to UNKNOWN by default and attributes that are not supported by all devices are set to StrFlag.NOT_SUPPORTED or IntFlag.NOT_SUPPORTED.
Attributes:
Name | Type | Description |
---|---|---|
display_set_state |
str
|
Display set state. |
display_status |
str
|
Display status. |
displaying_type |
str
|
Displaying type. |
fan_level |
int
|
Fan level. |
fan_set_level |
int
|
Fan set level. |
humidity |
int
|
Humidity level. |
mode |
str
|
Mode of device. |
mute_set_state |
str
|
Mute set state. |
mute_status |
str
|
Mute status. |
oscillation_set_state |
str
|
Oscillation set state. |
oscillation_status |
str
|
Oscillation status. |
sleep_change_fan_level |
str
|
Sleep change fan level. |
sleep_fallasleep_remain |
str
|
Sleep fall asleep remain. |
sleep_oscillation_switch |
str
|
Sleep oscillation switch. |
sleep_preference_type |
str
|
Sleep preference type. |
temperature |
int
|
Temperature. |
thermal_comfort |
int
|
Thermal comfort. |
timer |
Timer
|
Timer object. |
Source code in src\pyvesync\base_devices\fan_base.py
Attributes↲
connection_status
instance-attribute
↲
Inherited From DeviceState
device_status
instance-attribute
↲
Inherited From DeviceState
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.vesyncfan.VeSyncTowerFan ↲
VeSyncTowerFan(
details: ResponseDeviceDetailsModel,
manager: VeSync,
feature_map: FanMap,
)
Bases: BypassV2Mixin
, VeSyncFanBase
Levoit Tower Fan Device Class.
Inherited From VeSyncFanBase
Initialize VeSync device base class.
Initialize VeSync Tower Fan Base Class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
details
|
ResponseDeviceDetailsModel
|
Device details. |
required |
manager
|
VeSync
|
Manager. |
required |
feature_map
|
FanMap
|
Feature map. |
required |
See Also
See device_map for configured features and modes.
Initialize the VeSync Base API V2 Fan Class.
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
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
sleep_preferences
instance-attribute
↲
Inherited From VeSyncFanBase
state
instance-attribute
↲
Inherited From VeSyncBaseDevice
sub_device_no
instance-attribute
↲
Inherited From VeSyncBaseDevice
supports_displaying_type
property
↲
Inherited From VeSyncFanBase
Return True if device supports displaying type.
supports_mute
property
↲
Inherited From VeSyncFanBase
Return True if device supports mute.
supports_oscillation
property
↲
Inherited From VeSyncFanBase
Return True if device supports oscillation.
Functions↲
advanced_sleep_mode
async
deprecated
↲
Inherited From VeSyncFanBase
Deprecated
Use set_advanced_sleep_mode
method instead
Set advanced sleep mode.
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. |
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. |
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:
displayJSON
deprecated
↲
Inherited From VeSyncBaseDevice
Deprecated
Use to_json() instead
Return JSON details for device. - Deprecated use to_json().
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.
get_state ↲
Inherited From VeSyncBaseDevice
Get device state attribute.
get_timer
async
↲
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.
manual_mode
async
deprecated
↲
Inherited From VeSyncFanBase
Deprecated
Use set_manual_mode
method instead
Adapter to set mode to normal.
mode_toggle
async
deprecated
↲
normal_mode
async
deprecated
↲
set_advanced_sleep_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Advanced Sleep Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
set_auto_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Auto Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
set_fan_speed
async
↲
Inherited From VeSyncFanBase
Set Purifier Fan Speed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
speed
|
int
|
Fan speed level according to device specs. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
set_manual_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Manual Mode - Normal Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
set_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier Mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
Mode to set, varies by device type. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
set_normal_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Normal Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
set_sleep_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Sleep Mode.
This is also referred to as Advanced Sleep Mode on some devices.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
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. |
set_turbo_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Turbo Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
sleep_mode
async
deprecated
↲
Inherited From VeSyncFanBase
Deprecated
Use set_sleep_mode
method instead
Adapter to set advanced sleep mode.
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. |
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. |
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. |
toggle_display
async
↲
Inherited From VeSyncFanBase
Toggle Display on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
Display state. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
toggle_displaying_type
async
↲
Inherited From VeSyncFanBase
Toggle displaying type on/off.
This functionality is unknown but was in the API calls.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
Displaying type state. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
true if success. |
Set displaying type on/off - Unknown functionality.
toggle_mute
async
↲
Inherited From VeSyncFanBase
Toggle mute on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool True to turn mute on, False to turn off |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False if not |
toggle_oscillation
async
↲
Inherited From VeSyncFanBase
Toggle Oscillation on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
Oscillation state. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
true if success. |
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. |
turn_off_display
async
↲
Inherited From VeSyncFanBase
Turn off Display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request |
turn_off_oscillation
async
↲
Inherited From VeSyncFanBase
Set toggle_oscillation to off.
turn_on_display
async
↲
Inherited From VeSyncFanBase
Turn on Display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request |
turn_on_oscillation
async
↲
Inherited From VeSyncFanBase
Set toggle_oscillation to on.
pyvesync.base_devices.fan_base.VeSyncFanBase ↲
Bases: VeSyncBaseToggleDevice
Base device for VeSync tower fans.
Inherits from VeSyncBaseToggleDevice and VeSyncBaseDevice.
Attributes:
Name | Type | Description |
---|---|---|
fan_levels |
list[int]
|
Fan levels supported by device. |
modes |
list[str]
|
Modes supported by device. |
sleep_preferences |
list[str]
|
Sleep preferences supported by device. |
Source code in src\pyvesync\base_devices\fan_base.py
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 202 203 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 |
|
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
sleep_preferences
instance-attribute
↲
Inherited From VeSyncFanBase
state
instance-attribute
↲
Inherited From VeSyncBaseDevice
sub_device_no
instance-attribute
↲
Inherited From VeSyncBaseDevice
supports_displaying_type
property
↲
Inherited From VeSyncFanBase
Return True if device supports displaying type.
supports_mute
property
↲
Inherited From VeSyncFanBase
Return True if device supports mute.
supports_oscillation
property
↲
Inherited From VeSyncFanBase
Return True if device supports oscillation.
Functions↲
advanced_sleep_mode
async
deprecated
↲
Inherited From VeSyncFanBase
Deprecated
Use set_advanced_sleep_mode
method instead
Set advanced sleep mode.
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
manual_mode
async
deprecated
↲
Inherited From VeSyncFanBase
Deprecated
Use set_manual_mode
method instead
Adapter to set mode to normal.
mode_toggle
async
deprecated
↲
normal_mode
async
deprecated
↲
set_advanced_sleep_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Advanced Sleep Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
Source code in src\pyvesync\base_devices\fan_base.py
set_auto_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Auto Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
Source code in src\pyvesync\base_devices\fan_base.py
set_fan_speed
abstractmethod
async
↲
Set Purifier Fan Speed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
speed
|
int
|
Fan speed level according to device specs. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Source code in src\pyvesync\base_devices\fan_base.py
set_manual_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Manual Mode - Normal Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
Source code in src\pyvesync\base_devices\fan_base.py
set_mode
abstractmethod
async
↲
Set Purifier Mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
Mode to set, varies by device type. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
set_normal_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Normal Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
Source code in src\pyvesync\base_devices\fan_base.py
set_sleep_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Sleep Mode.
This is also referred to as Advanced Sleep Mode on some devices.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
Source code in src\pyvesync\base_devices\fan_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_turbo_mode
async
↲
Inherited From VeSyncFanBase
Set Purifier to Turbo Mode.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
Note
This method is not supported by all devices, will return false with warning debug message if not supported.
Source code in src\pyvesync\base_devices\fan_base.py
sleep_mode
async
deprecated
↲
Inherited From VeSyncFanBase
Deprecated
Use set_sleep_mode
method instead
Adapter to set advanced sleep mode.
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_display
async
↲
Toggle Display on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
Display state. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request. |
toggle_displaying_type
async
↲
Toggle displaying type on/off.
This functionality is unknown but was in the API calls.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
Displaying type state. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
true if success. |
Source code in src\pyvesync\base_devices\fan_base.py
toggle_mute
async
↲
Toggle mute on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool True to turn mute on, False to turn off |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if successful, False if not |
Source code in src\pyvesync\base_devices\fan_base.py
toggle_oscillation
async
↲
Toggle Oscillation on/off.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
toggle
|
bool
|
Oscillation state. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
true if success. |
Source code in src\pyvesync\base_devices\fan_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_display
async
↲
Inherited From VeSyncFanBase
Turn off Display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request |
turn_off_mute
async
↲
Inherited From VeSyncFanBase
Set toggle_mute to off.
turn_off_oscillation
async
↲
Inherited From VeSyncFanBase
Set toggle_oscillation to off.
turn_on
async
↲
Inherited From VeSyncBaseToggleDevice
Turn device on.
turn_on_display
async
↲
Inherited From VeSyncFanBase
Turn on Display.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
Success of request |
turn_on_mute
async
↲
Inherited From VeSyncFanBase
Set toggle_mute to on.
turn_on_oscillation
async
↲
Inherited From VeSyncFanBase
Set toggle_oscillation to on.
update
async
↲
Inherited From VeSyncBaseDevice
Update device details.