VeSync Constants↲
pyvesync.const ↲
pyvesync library constants.
All device states and information are defined by Enums in this module.
Attributes:
| Name | Type | Description |
|---|---|---|
DEFAULT_LANGUAGE |
str
|
Default language for the VeSync app. |
API_BASE_URL |
str
|
Base URL for the VeSync API. If not specified, a region-specific API URL is automatically selected. |
API_TIMEOUT |
int
|
Timeout for API requests. |
USER_AGENT |
str
|
User agent for API requests. |
DEFAULT_TZ |
str
|
Default timezone for VeSync devices, updated by API after login. |
DEFAULT_REGION |
str
|
Default region for VeSync devices, updated by API when retrieving devices. |
APP_VERSION |
str
|
Version of the VeSync app. |
APP_ID |
str
|
ID of the app. VeSync uses a random 8-letter string, but any non-empty string works. |
PHONE_BRAND |
str
|
Brand of the phone used to login to the VeSync app. |
PHONE_OS |
str
|
Operating system of the phone used to login to the VeSync app. |
MOBILE_ID |
str
|
Unique identifier for the phone used to login to the VeSync app. |
USER_TYPE |
str
|
User type for the VeSync app - internal app usage. |
BYPASS_APP_V |
str
|
Bypass app version |
BYPASS_HEADER_UA |
str
|
Bypass header user agent |
TERMINAL_ID |
str
|
Unique identifier for new API calls |
REGION_API_MAP
module-attribute
↲
REGION_API_MAP = {
'US': API_BASE_URL_US,
'EU': API_BASE_URL_EU,
}
USER_AGENT
module-attribute
↲
TERMINAL_ID
module-attribute
↲
TERMINAL_ID = (
'2'
+ uuid.uuid5(
uuid.NAMESPACE_DNS,
f'{uuid.getnode():x}-{platform.node() or ""}',
).hex
)
UNKNOWN_ERROR_CODE
module-attribute
↲
ErrorCodes.errors key of the UNKNOWN entry (the app's CloudErrorCode.UNKNOWN).
AIRFRYER_PID_MAP
module-attribute
↲
AIRFRYER_PID_MAP = {
'WiFi_SKA_AirFryer137_US': 'wnxwqs76gknqyzjn',
'WiFi_SKA_AirFryer158_US': '2cl8hmafsthl65bd',
'WiFi_AirFryer_CS158-AF_EU': '8t8op7pcvzlsbosm',
}
PID's for VeSync Air Fryers based on ConfigModule.
BYPASSV2_SUB_DEVICE_PAYLOAD
module-attribute
↲
BYPASSV2_SUB_DEVICE_PAYLOAD: MappingProxyType[
str, int | str
] = MappingProxyType(
{'subDeviceNo': 0, 'subDeviceType': ''}
)
Payload keys the VeSync app sends on every kitchen bypassV2 request.
Source: ApiManagerKt.deviceGlobalParamProvider in the APK.
AIRFRYER_PRESET_RECIPE_TYPE
module-attribute
↲
recipeType of every APK preset (KitchenPresetModel.recipeType).
CUSTOM_RECIPE_ID
module-attribute
↲
Recipe ID of the CS137/CS158 Manual Cooking preset.
CUSTOM_RECIPE_TYPE
module-attribute
↲
CUSTOM_RECIPE_TYPE = AIRFRYER_PRESET_RECIPE_TYPE
Recipe type of the CS137/CS158 Manual Cooking preset.
CUSTOM_RECIPE_NAME
module-attribute
↲
Recipe name of the CS137/CS158 Manual Cooking preset.
CUSTOM_COOK_MODE
module-attribute
↲
API mode string of the CS137/CS158 Manual Cooking preset.
PREHEAT_STATUSES
module-attribute
↲
PREHEAT_STATUSES = [
AirFryerCookStatus.PREHEAT_END,
AirFryerCookStatus.PREHEAT_STOP,
AirFryerCookStatus.HEATING,
]
Statuses counted as preheat mode (FryerState.is_in_preheat_mode).
PULL_OUT also counts while preheat time remains.
COOK_STATUSES
module-attribute
↲
COOK_STATUSES = [
AirFryerCookStatus.COOKING,
AirFryerCookStatus.COOK_STOP,
AirFryerCookStatus.COOK_END,
AirFryerCookStatus.READY,
AirFryerCookStatus.HOLD,
]
Statuses counted as cook mode (FryerState.is_in_cook_mode).
PULL_OUT also counts when no preheat time remains.
RESUMABLE_STATUSES
module-attribute
↲
RESUMABLE_STATUSES = [
AirFryerCookStatus.COOK_STOP,
AirFryerCookStatus.PREHEAT_STOP,
]
Paused statuses (FryerState.can_resume).
RUNNING_STATUSES
module-attribute
↲
RUNNING_STATUSES = [
AirFryerCookStatus.COOKING,
AirFryerCookStatus.HEATING,
AirFryerCookStatus.HOLD,
]
Statuses whose remaining times count down; setting one stamps last_timestamp.
A HOLD chamber's stamp is cleared by the dual fryer's update() while
the other chamber is not cooking, which stops its countdown.
ENERGY_HISTORY_MAP
module-attribute
↲
ENERGY_HISTORY_MAP = {
EnergyIntervals.WEEK: 'getLastWeekEnergy',
EnergyIntervals.MONTH: 'getLastMonthEnergy',
EnergyIntervals.YEAR: 'getLastYearEnergy',
}
ENERGY_HISTORY_OFFSET_WHOGPLUG
module-attribute
↲
ENERGY_HISTORY_OFFSET_WHOGPLUG = {
EnergyIntervals.WEEK: 500000,
EnergyIntervals.MONTH: 2500000,
}
DRYING_MODES
module-attribute
↲
DRYING_MODES: dict[str, int] = {
DryingModes.DONE: 0,
DryingModes.RUNNING: 1,
DryingModes.PAUSE: 2,
}
IntEnumMixin ↲
Bases: IntEnum
Mixin class to handle missing enum values.
Adds missing method using the extend_enum function to
return a new enum member with the name "UNKNOWN" and the
missing value.
Source code in src/pyvesync/utils/enum_utils.py
_missing_
classmethod
↲
Inherited From IntEnumMixin
Handle missing enum values by returning member with UNKNOWN name.
Source code in src/pyvesync/utils/enum_utils.py
TimeUnits ↲
Bases: StrEnum
Time units for VeSync devices.
Attributes:
| Name | Type | Description |
|---|---|---|
MINUTES |
Time in minutes. |
|
SECONDS |
Time in seconds. |
|
HOURS |
Time in hours. |
Source code in src/pyvesync/const.py
ProductLines ↲
Bases: StrEnum
High level product line.
Source code in src/pyvesync/const.py
ProductTypes ↲
Bases: StrEnum
General device types enum.
Source code in src/pyvesync/const.py
IntFlag ↲
Bases: IntEnum
DEPRECATED. Integer flag to indicate if a device is not supported.
This is used by data models as a default value for feature attributes that are not supported by all devices.
The default value is -999.
Attributes:
| Name | Type | Description |
|---|---|---|
NOT_SUPPORTED |
Device is not supported, -999 |
Source code in src/pyvesync/const.py
StrFlag ↲
Bases: StrEnum
DEPRECATED. String flag to indicate if a device is not supported.
This is used by data models as a default value for feature attributes that are not supported by all devices.
The default value is "not_supported".
Attributes:
| Name | Type | Description |
|---|---|---|
NOT_SUPPORTED |
Device is not supported, "not_supported" |
Source code in src/pyvesync/const.py
NightlightStatus ↲
Bases: StrEnum
Nightlight status for VeSync devices.
Values can be converted to int and bool.
Attributes:
| Name | Type | Description |
|---|---|---|
ON |
Nightlight is on. |
|
OFF |
Nightlight is off. |
|
AUTO |
Nightlight is in auto mode. |
|
UNKNOWN |
Nightlight status is unknown. |
Usage
Source code in src/pyvesync/const.py
DeviceStatus ↲
Bases: StrEnum
VeSync device status enum.
In addition to converting to int and bool values, this enum can be used to convert from bool and int values to corresponding string values.
Attributes:
| Name | Type | Description |
|---|---|---|
ON |
Device is on. |
|
OFF |
Device is off. |
|
PAUSED |
Device is paused. |
|
STANDBY |
Device is in standby mode. |
|
IDLE |
Device is idle. |
|
RUNNING |
Device is running. |
|
UNKNOWN |
Device status is unknown. |
Usage
Source code in src/pyvesync/const.py
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 | |
__bool__ ↲
__int__ ↲
Return integer representation of the enum.
1 is ON and RUNNING, 0 is OFF, PAUSED, STANDBY, IDLE. -1 is UNKNOWN.
Source code in src/pyvesync/const.py
from_int
classmethod
↲
Convert integer value to corresponding string.
If value is 1, return ON and if 0, return OFF. If value is -999, return NOT_SUPPORTED.
Source code in src/pyvesync/const.py
from_bool
classmethod
↲
from_bool(value: bool | str) -> DeviceStatus
Convert boolean value to corresponding string.
from_bool_string
classmethod
↲
from_bool_string(value: str) -> DeviceStatus
ConnectionStatus ↲
Bases: StrEnum
VeSync device connection status enum.
Corresponding boolean value is True if device is online.
Attributes:
| Name | Type | Description |
|---|---|---|
ONLINE |
Device is online. |
|
OFFLINE |
Device is offline. |
|
UNKNOWN |
Device connection status is unknown. |
Methods:
| Name | Description |
|---|---|
from_bool |
bool | None) -> ConnectionStatus: Convert boolean value to corresponding string. |
Usage
Source code in src/pyvesync/const.py
__bool__ ↲
from_bool
classmethod
↲
from_bool(value: bool | None) -> ConnectionStatus
Convert boolean value to corresponding string.
Returns ConnectionStatus.ONLINE if True, else ConnectionStatus.OFFLINE.
Source code in src/pyvesync/const.py
TemperatureUnits ↲
Bases: StrEnum
Temperature units for VeSync devices.
Attributes:
| Name | Type | Description |
|---|---|---|
CELSIUS |
Temperature in Celsius. |
|
FAHRENHEIT |
Temperature in Fahrenheit. |
Source code in src/pyvesync/const.py
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 | |
label
property
↲
Return the label for the temperature unit, 'celsius' or 'fahrenheit'.
The CS137/CS158 air fryer sends this as tempUnit.
from_string
classmethod
↲
from_string(value: str) -> TemperatureUnits
Convert string value to corresponding TemperatureUnit.
Matches on the first letter, case-insensitive and ignoring surrounding whitespace, so the API's spellings ('c', 'celsius', 'f', 'fahrenheit') and misspellings of either unit are accepted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str
|
The unit string, or a |
required |
Returns:
| Name | Type | Description |
|---|---|---|
TemperatureUnits |
TemperatureUnits
|
The matching unit. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the value is not a string starting with 'c' or 'f'. |
Source code in src/pyvesync/const.py
to_celsius
classmethod
↲
to_celsius(value: float, unit: TemperatureUnits) -> float
Convert temperature to Celsius.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The temperature in |
required |
unit
|
TemperatureUnits
|
The unit of |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The temperature in Celsius; |
float
|
is already Celsius. |
Source code in src/pyvesync/const.py
to_fahrenheit
classmethod
↲
to_fahrenheit(
value: float, unit: TemperatureUnits
) -> float
Convert temperature to Fahrenheit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The temperature in |
required |
unit
|
TemperatureUnits
|
The unit of |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The temperature in Fahrenheit; |
float
|
|
Source code in src/pyvesync/const.py
NightlightModes ↲
Bases: StrEnum
Nightlight modes.
Attributes:
| Name | Type | Description |
|---|---|---|
ON |
Nightlight is on. |
|
OFF |
Nightlight is off. |
|
DIM |
Nightlight is dimmed. |
|
AUTO |
Nightlight is in auto mode. |
|
UNKNOWN |
Nightlight status is unknown. |
Source code in src/pyvesync/const.py
__bool__ ↲
Return True if nightlight is on or auto.
Off and unknown are False, all other True.
ColorMode ↲
Bases: StrEnum
VeSync bulb color modes.
Attributes:
| Name | Type | Description |
|---|---|---|
RGB |
RGB color mode. |
|
HSV |
HSV color mode. |
|
WHITE |
White color mode. |
|
COLOR |
Color mode. |
Source code in src/pyvesync/const.py
AirQualityLevel ↲
Bases: Enum
Representation of air quality levels as string and integers.
Attributes:
| Name | Type | Description |
|---|---|---|
EXCELLENT |
Air quality is excellent. |
|
GOOD |
Air quality is good. |
|
MODERATE |
Air quality is moderate. |
|
POOR |
Air quality is poor. |
|
UNKNOWN |
Air quality is unknown. |
Methods:
| Name | Description |
|---|---|
from_string |
str | None) -> AirQualityLevel: Convert string value to corresponding integer. |
from_int |
int | None) -> AirQualityLevel: Convert integer value to corresponding string. |
Note
Alias for "very good" is "excellent". Alias for "bad" is "poor".
Usage
AirQualityLevels.EXCELLENT
# <AirQualityLevels.EXCELLENT: 1>
AirQualityLevels.from_string("excellent")
# 1
AirQualityLevels.from_int(1)
# "excellent"
int(AirQualityLevels.EXCELLENT)
# 1
str(AirQualityLevels.EXCELLENT)
# "excellent"
from_string("good")
# <AirQualityLevels.GOOD: 2>
from_int(2)
# "good"
Source code in src/pyvesync/const.py
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | |
__int__ ↲
__str__ ↲
from_string
classmethod
↲
from_string(value: str | None) -> AirQualityLevel
Convert string value to corresponding integer.
Get enum from string value to normalize different values of the same format.
Note
Values are excellent, good, moderate and poor. Aliases are: very good for excellent and bad for poor. Unknown is returned if value is None or not in the list.
Source code in src/pyvesync/const.py
from_int
classmethod
↲
from_int(value: int | None) -> AirQualityLevel
Convert integer value to corresponding string.
PurifierAutoPreference ↲
Bases: StrEnum
Preference Levels for Purifier Auto Mode.
Attributes:
| Name | Type | Description |
|---|---|---|
DEFAULT |
Default preference level. |
|
EFFICIENT |
Efficient preference level. |
|
QUIET |
Quiet preference level. |
|
UNKNOWN |
Unknown preference level. |
Source code in src/pyvesync/const.py
FanSleepPreference ↲
Bases: StrEnum
Sleep mode preferences for VeSync fans.
Attributes:
| Name | Type | Description |
|---|---|---|
DEFAULT |
Default sleep mode. |
|
ADVANCED |
Advanced sleep mode. |
|
TURBO |
Turbo sleep mode. |
|
EFFICIENT |
Efficient sleep mode. |
|
QUIET |
Quiet sleep mode. |
|
UNKNOWN |
Unknown sleep mode. |
Source code in src/pyvesync/const.py
Features ↲
HumidifierFeatures ↲
Bases: Features
VeSync humidifier features.
Attributes:
| Name | Type | Description |
|---|---|---|
ONOFF |
Device on/off status. |
|
CHILD_LOCK |
Child lock status. |
|
NIGHTLIGHT |
Nightlight status. |
|
WATER_LEVEL |
Water level status. |
|
WARM_MIST |
Warm mist status. |
|
AUTO_STOP |
Auto stop when target humidity is reached. Different from auto, which adjusts fan level to maintain humidity. |
|
RGB_NIGHTLIGHT |
RGB nightlight with color control. |
Source code in src/pyvesync/const.py
PurifierFeatures ↲
Bases: Features
VeSync air purifier features.
Attributes:
| Name | Type | Description |
|---|---|---|
CHILD_LOCK |
Child lock status. |
|
NIGHTLIGHT |
Nightlight status. |
|
AIR_QUALITY |
Air quality status. |
|
VENT_ANGLE |
Vent angle status. |
|
LIGHT_DETECT |
Light detection status. |
|
PM25 |
PM2.5 level status. |
|
PM10 |
PM10 level status. |
|
PM1 |
PM1 level status. |
|
AQPERCENT |
Air quality percentage status. |
|
RESET_FILTER |
Reset filter status. |
Source code in src/pyvesync/const.py
PurifierStringLevels ↲
Bases: Features
String levels for Air Purifier fan speed.
Attributes:
| Name | Type | Description |
|---|---|---|
LOW |
Low fan speed. |
|
MEDIUM |
Medium fan speed. |
|
HIGH |
High fan speed. |
Source code in src/pyvesync/const.py
BulbFeatures ↲
Bases: Features
VeSync bulb features.
Attributes:
| Name | Type | Description |
|---|---|---|
ONOFF |
Device on/off status. |
|
DIMMABLE |
Dimmable status. |
|
COLOR_TEMP |
Color temperature status. |
|
MULTICOLOR |
Multicolor status. |
Source code in src/pyvesync/const.py
OutletFeatures ↲
Bases: Features
VeSync outlet features.
Attributes:
| Name | Type | Description |
|---|---|---|
ONOFF |
Device on/off status. |
|
ENERGY_MONITOR |
Energy monitor status. |
|
ENERGY_HISTORY |
Energy history retrieval support. |
|
NIGHTLIGHT |
Nightlight status. |
Source code in src/pyvesync/const.py
SwitchFeatures ↲
Bases: Features
VeSync switch features.
Attributes:
| Name | Type | Description |
|---|---|---|
ONOFF |
Device on/off status. |
|
DIMMABLE |
Dimmable status. |
|
INDICATOR_LIGHT |
Indicator light status. |
|
BACKLIGHT |
Backlight status. |
|
BACKLIGHT_RGB |
RGB backlight status. |
Source code in src/pyvesync/const.py
FanFeatures ↲
Bases: Features
VeSync fan features.
Source code in src/pyvesync/const.py
PurifierModes ↲
Bases: Features
VeSync air purifier modes.
Attributes:
| Name | Type | Description |
|---|---|---|
AUTO |
Auto mode. |
|
MANUAL |
Manual mode. |
|
SLEEP |
Sleep mode. |
|
TURBO |
Turbo mode. |
|
PET |
Pet mode. |
|
UNKNOWN |
Unknown mode. |
Source code in src/pyvesync/const.py
HumidifierModes ↲
Bases: Features
VeSync humidifier modes.
Attributes:
| Name | Type | Description |
|---|---|---|
AUTO |
Auto mode. |
|
MANUAL |
Manual mode. |
|
HUMIDITY |
Humidity mode. |
|
SLEEP |
Sleep mode. |
|
TURBO |
Turbo mode. |
|
PET |
Pet mode. |
|
UNKNOWN |
Unknown mode. |
|
AUTOPRO |
AutoPro mode. |
Source code in src/pyvesync/const.py
FanModes ↲
Bases: StrEnum
VeSync fan modes.
Attributes:
| Name | Type | Description |
|---|---|---|
AUTO |
Auto mode. |
|
NORMAL |
Normal mode. |
|
MANUAL |
Manual mode. |
|
SLEEP |
Sleep mode. |
|
TURBO |
Turbo mode. |
|
PET |
Pet mode. |
|
UNKNOWN |
Unknown mode. |
|
ADVANCED_SLEEP |
Advanced sleep mode. |
Source code in src/pyvesync/const.py
AirFryerPresetRecipe
dataclass
↲
Recipe for VeSyncFryer.set_mode_from_recipe().
Get a fryer's presets with get_mode_recipe() and change them with
dataclasses.replace. The recipe ID, name and type are sent as given.
The cook mode must be one of the fryer's modes and the times must be
valid, otherwise set_mode_from_recipe() returns False without a
request.
Attributes:
| Name | Type | Description |
|---|---|---|
recipe_id |
int
|
Recipe ID. |
recipe_type |
int
|
Recipe type. |
recipe_name |
str
|
Recipe name. |
cook_mode |
str
|
The API mode string (for example |
target_temp |
int
|
Target temperature in |
temp_unit |
str
|
Temperature unit ('f' or 'c', or any string
|
cook_time |
int
|
Cooking time in seconds, at least 1 (60 on the CS137/CS158). |
preheat_time |
int | None
|
Preheating time in seconds, if any. Adds a
preheat phase only on fryers with the |
Source code in src/pyvesync/const.py
AirFryerTempLimits
dataclass
↲
Temperature limits of one cook mode in one unit (APK tempRangeC/F).
Attributes:
| Name | Type | Description |
|---|---|---|
min_temp |
int
|
Lowest temperature the mode accepts. |
max_temp |
int
|
Highest temperature the mode accepts. |
step |
int
|
Temperature step of the mode. A requested temperature is rounded to the nearest step, not rejected. |
Source code in src/pyvesync/const.py
AirFryerTimeLimits
dataclass
↲
Cook time limits of one cook mode, in seconds (APK time range and precision).
Attributes:
| Name | Type | Description |
|---|---|---|
min_seconds |
int
|
Shortest time the mode accepts. |
max_seconds |
int
|
Longest time the mode accepts. |
step_seconds |
int
|
Allowed increment from the minimum. A time off the step is rejected, not rounded. |
Source code in src/pyvesync/const.py
accepts ↲
Return whether a cook time is within the range and on a step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seconds
|
float | str
|
Requested time. A whole number given as a float or string counts; a fraction or a boolean does not. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Whether the mode accepts the time. |
Source code in src/pyvesync/const.py
AirFryerModeConfig
dataclass
↲
One APK preset: its request values, default time and temperatures.
Attributes:
| Name | Type | Description |
|---|---|---|
api_mode |
str
|
Mode string sent to and reported by the API. |
recipe_id |
int
|
Preset recipe ID sent with the mode. |
recipe_name |
str
|
Preset label sent as the recipe name. |
cook_time |
int
|
Default cook time in seconds. Not a limit; see
|
temp_c |
AirFryerTempLimits
|
Celsius limits. |
temp_f |
AirFryerTempLimits
|
Fahrenheit limits. |
default_temp_c |
int
|
Default temperature in Celsius. |
default_temp_f |
int
|
Default temperature in Fahrenheit. |
recipe_type |
int
|
Preset recipe type, 3 for every APK preset. |
time_limits |
AirFryerTimeLimits | None
|
Cook time limits. None applies only the general minimum, with no upper limit or step. |
Source code in src/pyvesync/const.py
limits ↲
limits(temp_unit: TemperatureUnits) -> AirFryerTempLimits
Return the limits in the given unit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temp_unit
|
TemperatureUnits
|
The unit to return. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AirFryerTempLimits |
AirFryerTempLimits
|
The Fahrenheit or Celsius limits. |
Source code in src/pyvesync/const.py
to_recipe ↲
to_recipe(
temp_unit: TemperatureUnits,
) -> AirFryerPresetRecipe
Return the preset as a recipe at its default time and temperature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temp_unit
|
TemperatureUnits
|
The unit of the recipe's temperature. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AirFryerPresetRecipe |
AirFryerPresetRecipe
|
The recipe, with no preheat. |
Source code in src/pyvesync/const.py
AirFryerPresets ↲
Library preset recipes, used as each fryer's default_preset.
Their times and temperatures are library defaults, not a fryer's app
defaults; use VeSyncFryer.get_mode_recipe() for those.
Attributes:
| Name | Type | Description |
|---|---|---|
custom |
AirFryerPresetRecipe
|
CS137/CS158 Manual Cooking, the
|
air_fry |
AirFryerPresetRecipe
|
Air Fry, the |
broil |
AirFryerPresetRecipe
|
Broil (bypassV2 mode string). |
roast |
AirFryerPresetRecipe
|
Roast (bypassV2 mode string). |
bake |
AirFryerPresetRecipe
|
Bake (bypassV2 mode string). |
Source code in src/pyvesync/const.py
985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | |
AirFryerCookModes ↲
Bases: StrEnum
Cooking modes for VeSync Air Fryers.
One member covers the same food on different fryers; the API mode string
and label of each fryer are in its device map cook_modes.
Attributes:
| Name | Type | Description |
|---|---|---|
CUSTOM |
Custom (manual) cooking mode. |
|
ROAST |
Roast cooking mode. |
|
BAKE |
Bake cooking mode. |
|
REHEAT |
Reheat cooking mode. |
|
DEHYDRATE |
Dehydrate cooking mode. |
|
FROZEN |
Frozen food cooking mode. |
|
PROOF |
Proof cooking mode. |
|
BROIL |
Broil cooking mode. |
|
WARM |
Warm cooking mode. |
|
AIRFRY |
Air fry cooking mode. |
|
DRY |
Dry cooking mode. |
|
GRILL |
Grill cooking mode. |
|
PREHEAT |
Preheat mode. |
|
STEAK |
Steak preset. |
|
CHICKEN |
Chicken (poultry) preset. |
|
SEAFOOD |
Seafood (fish) preset. |
|
BACON |
Bacon preset. |
|
VEGETABLES |
Vegetables preset. |
|
ROOT_VEGETABLES |
Root vegetables preset. |
|
DESSERTS |
Desserts preset. |
|
SHRIMP |
Shrimp preset. |
|
BREAD |
Bread preset. |
|
FRENCH_FRIES |
French fries preset. |
Source code in src/pyvesync/const.py
AirFryerFeatures ↲
Bases: Features
VeSync Air Fryer features.
Attributes:
| Name | Type | Description |
|---|---|---|
DUAL_BLAZE |
Not used by the library. |
|
PREHEAT |
The fryer accepts a preheat phase ( |
|
DUAL_CHAMBER |
Two chambers; adds |
|
RESUMABLE |
|
|
WHOLE_CHAMBER |
Single merged basket with the divider removed
(workChamber 3); adds |
|
CHAMBER_MODES |
|
|
COOK_CONFIG_SHAKE_TIME |
|
Source code in src/pyvesync/const.py
AirFryerCookStatus ↲
Bases: StrEnum
Cooking status for VeSync Air Fryers.
Each fryer's device map status_map maps its API status strings to
these members; not every fryer reports every status.
Attributes:
| Name | Type | Description |
|---|---|---|
COOKING |
Cooking. The CAF-P583S also reports keep-warm as cooking. |
|
COOK_STOP |
Cook paused. |
|
COOK_END |
Cook finished. |
|
PULL_OUT |
Basket pulled out. |
|
COMPLETED |
Not reported by any mapped fryer. |
|
HEATING |
Preheating. |
|
UNKNOWN |
Not reported by any mapped fryer. |
|
STANDBY |
Idle. |
|
PREHEAT_END |
Preheat finished, waiting for |
|
PREHEAT_STOP |
Preheat paused. |
|
READY |
Cook programmed, waiting for the start button. |
|
APPOINTING |
Delayed start scheduled; waiting to start (CS158
|
|
HOLD |
Sync cook: this chamber waits so both chambers finish
together (dual-chamber fryers, |
Source code in src/pyvesync/const.py
AirFryer158Command ↲
Bases: StrEnum
CS137/CS158 cookStatus / preheatStatus command values.
Sent in the cookMode and preheat commands (CS158 captures).
Attributes:
| Name | Type | Description |
|---|---|---|
COOKING |
Start or resume the cook ( |
|
HEATING |
Start or resume the preheat ( |
|
STOP |
Pause the cook or preheat. |
|
END |
End the cook or preheat. |
Source code in src/pyvesync/const.py
AirFryerSyncType ↲
Bases: IntEnum
Dual fryer syncType values (APK SyncType).
Attributes:
| Name | Type | Description |
|---|---|---|
OFF |
Chambers run independently (APK |
|
MATCH |
App label "Match" (APK |
|
SYNC |
App label "Sync": both chambers finish together (APK
|
Source code in src/pyvesync/const.py
AirFryerChamber ↲
Bases: IntEnum
Air fryer chamber (basket) selection.
Values match the API workChamber / chamber fields (APK
WorkChamberType).
Attributes:
| Name | Type | Description |
|---|---|---|
CHAMBER_1 |
Left chamber on the TF101S/TF102S, upper on the DC111S; the only basket on single-chamber fryers. |
|
CHAMBER_2 |
Right chamber on the TF101S/TF102S, lower on the DC111S. |
|
WHOLE |
Divider removed, one large basket (TwinFry models only). |
|
BOTH |
Both chambers cooking in sync ( |
Source code in src/pyvesync/const.py
ThermostatWorkModes ↲
Bases: IntEnum
Working modes for VeSync Aura thermostats.
Based on the VeSync app and API values.
Attributes:
| Name | Type | Description |
|---|---|---|
OFF |
Thermostat is off (0). |
|
HEAT |
Thermostat is in heating mode (1). |
|
COOL |
Thermostat is in cooling mode (2). |
|
AUTO |
Thermostat is in auto mode (3). |
|
EM_HEAT |
Thermostat is in emergency heating mode (4). |
|
SMART_AUTO |
Thermostat is in smart auto mode (5). |
Source code in src/pyvesync/const.py
ThermostatFanModes ↲
Bases: IntEnum
Fan modes for VeSync Aura thermostats.
Based on the VeSync app and API values.
Attributes:
| Name | Type | Description |
|---|---|---|
AUTO |
Fan is in auto mode (1). |
|
ON |
Fan is on (2). |
|
CIRCULATE |
Fan is in circulate mode (3). |
Source code in src/pyvesync/const.py
ThermostatHoldOptions ↲
Bases: IntEnumMixin
Hold options for VeSync Aura thermostats.
Attributes:
| Name | Type | Description |
|---|---|---|
UNTIL_NEXT_SCHEDULED_ITEM |
Hold until next scheduled item (2). |
|
TWO_HOURS |
Hold for two hours (3). |
|
FOUR_HOURS |
Hold for four hours (4). |
|
PERMANENTLY |
Hold permanently (5). |
Source code in src/pyvesync/const.py
ThermostatHoldStatus ↲
Bases: IntEnumMixin
Set the hold status of the thermostat.
Attributes:
| Name | Type | Description |
|---|---|---|
SET |
Set the hold status (1). |
|
CANCEL |
Cancel the hold status (0). |
Source code in src/pyvesync/const.py
ThermostatScheduleOrHoldOptions ↲
Bases: IntEnumMixin
Schedule or hold options for VeSync Aura thermostats.
Source code in src/pyvesync/const.py
ThermostatEcoTypes ↲
ThermostatRoutineTypes ↲
ThermostatAlarmCodes ↲
ThermostatReminderCodes ↲
ThermostatWorkStatusCodes ↲
ThermostatFanStatus ↲
ThermostatConst ↲
Constants for VeSync Aura thermostats.
Source code in src/pyvesync/const.py
EnergyIntervals ↲
Bases: StrEnum
Energy history periods for VeSync outlets.
Attributes:
| Name | Type | Description |
|---|---|---|
DAILY |
Daily energy history. |
|
WEEKLY |
Weekly energy history. |
|
MONTHLY |
Monthly energy history. |
|
YEARLY |
Yearly energy history. |
Source code in src/pyvesync/const.py
DryingModes ↲
Bases: StrEnum
Drying modes for VeSync humidifiers.
Attributes:
| Name | Type | Description |
|---|---|---|
ON |
Drying mode is on. |
|
OFF |
Drying mode is off. |
Source code in src/pyvesync/const.py
from_int
classmethod
↲
from_int(value: int) -> DryingModes | None
Convert integer value to corresponding string.
If value is 1, return ON and if 0, return OFF. If value is -999, return NOT_SUPPORTED.
Source code in src/pyvesync/const.py
__int__ ↲
Return integer representation of the enum.