VeSync device_map configuration↲
pyvesync.device_map ↲
Device and module mappings for VeSync devices.
This module contains mappings for VeSync devices to their respective classes.
The mappings are used to create instances of the appropriate device class
based on the device type and define features and modes. The device type is taken
from the deviceType
field in the device list API.
The AirFryerMap, OutletMap, SwitchMap, BulbMap, FanMap, HumidifierMap, PurifierMap
and ThermostatMap dataclasses are used to define the mappings for each product type
with the assocated module, class, features and other device specific configuration. The
get_device_config
function is used
to get the device map object from the device type to instantiate the appropriate class.
The individual get_<product-type>
functions are used to get the device details
for the specific to the device type. Both functions return the same model,
the individual product type functions are used to satisfy type checking in
the individual devices.
Attributes:
Name | Type | Description |
---|---|---|
outlet_modules |
list[OutletMap]: List of Outlet device mappings. |
|
switch_modules |
list[SwitchMap]: List of Switch device mappings. |
|
bulb_modules |
list[BulbMap]: List of Bulb device mappings. |
|
fan_modules |
list[FanMap]
|
list[FanMap]: List of Fan device mappings. |
purifier_modules |
list[PurifierMap]
|
list[PurifierMap]: List of Purifier device mappings. |
humidifier_modules |
list[HumidifierMap]: List of Humidifier device mappings. |
|
air_fryer_modules |
list[AirFryerMap]
|
list[AirFryerMap]: List of Air Fryer device mappings. |
thermostat_modules |
list[ThermostatMap]: List of Thermostat device mappings. |
Classes:
Name | Description |
---|---|
ProductTypes |
Enum: General device types enum. |
DeviceMapTemplate |
Template for DeviceModules mapping. |
OutletMap |
Template for Outlet device mapping. |
SwitchMap |
Template for Switch device mapping. |
BulbMap |
dataclass: Template for Bulb device mapping. |
FanMap |
dataclass: Template for Fan device mapping. |
HumidifierMap |
dataclass: Template for Humidifier device mapping. |
PurifierMap |
dataclass: Template for Purifier device mapping. |
AirFryerMap |
dataclass: Template for Air Fryer device mapping. |
ThermostatMap |
dataclass: Template for Thermostat device mapping. |
Functions:
Name | Description |
---|---|
get_device_config |
Get the device map object from the device type. |
get_outlet |
Get outlet device config, returning OutletMap object. |
get_switch |
Get switch device config, returning SwitchMap object. |
get_bulb |
Get the bulb device config, returning BulbMap object. |
get_fan |
Get the fan device config, returning the FanMap object. |
get_humidifier |
Get the humidfier config, returning the HumidifierMap object. |
get_purifier |
Get the purifier config, returning the PurifierMap object. |
get_air_fryer |
Get the Air Fryer config, returning the AirFryerMap object. |
get_thermostat |
Get the thermostat config, returning the ThermostatMap object. |
Note
To add devices, add the device mapping to the appropriate <product-type>_modules
list, ensuring all required fields are present based on the <product-type>Map
fields.
T_MAPS
module-attribute
↲
T_MAPS = Union[
list['OutletMap'],
list['SwitchMap'],
list['BulbMap'],
list['FanMap'],
list['HumidifierMap'],
list['PurifierMap'],
list['AirFryerMap'],
list['ThermostatMap'],
]
thermostat_modules
module-attribute
↲
thermostat_modules = [
ThermostatMap(
dev_types=['LTM-A401S-WUS'],
class_name='VeSyncAuraThermostat',
fan_modes=[AUTO, CIRCULATE, ON],
modes=[HEAT, COOL, AUTO, OFF],
eco_types=[
BALANCE,
COMFORT_FIRST,
COMFORT_SECOND,
ECO_FIRST,
ECO_SECOND,
],
hold_options=[
PERMANENTLY,
FOUR_HOURS,
TWO_HOURS,
UNTIL_NEXT_SCHEDULED_ITEM,
],
routine_types=[AWAY, CUSTOM, HOME, SLEEP],
setup_entry='LTM-A401S-WUS',
model_display='LTM-A401S Series',
model_name='Aura Thermostat',
)
]
outlet_modules
module-attribute
↲
outlet_modules = [
OutletMap(
dev_types=['wifi-switch-1.3'],
class_name='VeSyncOutlet7A',
features=[ENERGY_MONITOR],
model_name='WiFi Outlet US/CA',
model_display='ESW01-USA Series',
setup_entry='wifi-switch-1.3',
),
OutletMap(
dev_types=['ESW10-USA'],
class_name='VeSyncESW10USA',
features=[],
model_name='10A WiFi Outlet USA',
model_display='ESW10-USA Series',
setup_entry='ESW03-USA',
),
OutletMap(
dev_types=['ESW01-EU'],
class_name='VeSyncOutlet10A',
features=[ENERGY_MONITOR],
model_name='10A WiFi Outlet Europe',
model_display='ESW01-EU',
setup_entry='ESW01-EU',
),
OutletMap(
dev_types=['ESW15-USA'],
class_name='VeSyncOutlet15A',
features=[ENERGY_MONITOR, NIGHTLIGHT],
nightlight_modes=[ON, OFF, AUTO],
model_name='15A WiFi Outlet US/CA',
model_display='ESW15-USA Series',
setup_entry='ESW15-USA',
),
OutletMap(
dev_types=['ESO15-TB'],
class_name='VeSyncOutdoorPlug',
features=[ENERGY_MONITOR],
model_name='Outdoor Plug',
model_display='ESO15-TB Series',
setup_entry='ESO15-TB',
),
OutletMap(
dev_types=['BSDOG01'],
class_name='VeSyncOutletBSDGO1',
features=[ONOFF],
model_name='Smart Plug',
model_display='Smart Plug Series',
setup_entry='BSDOG01',
device_alias='Greensun Smart Plug',
),
]
List of 'OutletMap' configuration objects for outlet devices.
switch_modules
module-attribute
↲
switch_modules = [
SwitchMap(
dev_types=['ESWL01'],
class_name='VeSyncWallSwitch',
device_alias='Wall Switch',
features=[ONOFF],
model_name='Light Switch',
model_display='ESWL01 Series',
setup_entry='ESWL01',
),
SwitchMap(
dev_types=['ESWD16'],
class_name='VeSyncDimmerSwitch',
features=[DIMMABLE, INDICATOR_LIGHT, BACKLIGHT_RGB],
device_alias='Dimmer Switch',
model_name='Dimmer Switch',
model_display='ESWD16 Series',
setup_entry='ESWD16',
),
SwitchMap(
dev_types=['ESWL03'],
class_name='VeSyncWallSwitch',
device_alias='Three-Way Wall Switch',
features=[ONOFF],
model_name='Light Switch 3 way',
model_display='ESWL03 Series',
setup_entry='ESWL03',
),
]
List of 'SwitchMap' configuration objects for switch devices.
bulb_modules
module-attribute
↲
bulb_modules = [
BulbMap(
dev_types=['ESL100'],
class_name='VeSyncBulbESL100',
features=[DIMMABLE],
color_model=None,
device_alias='Dimmable Bright White Bulb',
color_modes=[WHITE],
model_display='ESL100 Series',
model_name='Soft white light bulb',
setup_entry='ESL100',
),
BulbMap(
dev_types=['ESL100CW'],
class_name='VeSyncBulbESL100CW',
features=[DIMMABLE, COLOR_TEMP],
color_model=None,
device_alias='Dimmable Tunable White Bulb',
color_modes=[WHITE],
model_display='ESL100CW Series',
model_name='Cool-to-Warm White Light Bulb',
setup_entry='ESL100CW',
),
BulbMap(
dev_types=['XYD0001'],
class_name='VeSyncBulbValcenoA19MC',
features=[DIMMABLE, MULTICOLOR, COLOR_TEMP],
color_model=HSV,
device_alias='Valceno Dimmable RGB Bulb',
color_modes=[WHITE, COLOR],
model_display='XYD0001',
model_name='Valceno WiFi Bulb',
setup_entry='XYD0001',
),
BulbMap(
dev_types=['ESL100MC'],
class_name='VeSyncBulbESL100MC',
features=[COLOR_TEMP, MULTICOLOR, DIMMABLE],
color_model=RGB,
device_alias='Etekcity Dimmable RGB Bulb',
color_modes=[WHITE, COLOR],
model_name='Multicolour Bulb',
model_display='ESL100MC',
setup_entry='ESL100MC',
),
]
List of 'BulbMap' configuration objects for bulb devices.
humidifier_modules
module-attribute
↲
humidifier_modules = [
HumidifierMap(
class_name='VeSyncHumid200300S',
dev_types=[
'Classic300S',
'LUH-A601S-WUSB',
'LUH-A601S-AUSW',
],
features=[NIGHTLIGHT, NIGHTLIGHT_BRIGHTNESS],
mist_modes={
AUTO: 'auto',
SLEEP: 'sleep',
MANUAL: 'manual',
},
mist_levels=list(range(1, 10)),
device_alias='Classic 300S',
model_display='LUH-A601S Series',
model_name='Classic 300S',
setup_entry='Classic300S',
),
HumidifierMap(
class_name='VeSyncHumid200S',
dev_types=['Classic200S'],
features=[],
mist_modes={AUTO: 'auto', MANUAL: 'manual'},
mist_levels=list(range(1, 10)),
device_alias='Classic 200S',
model_display='Classic 200S Series',
model_name='Classic 200S',
setup_entry='Classic200S',
),
HumidifierMap(
class_name='VeSyncHumid200300S',
dev_types=[
'Dual200S',
'LUH-D301S-WUSR',
'LUH-D301S-WJP',
'LUH-D301S-WEU',
],
features=[],
mist_modes={AUTO: 'auto', MANUAL: 'manual'},
mist_levels=list(range(1, 3)),
device_alias='Dual 200S',
model_display='LUH-D301S Series',
model_name='Dual 200S',
setup_entry='Dual200S',
),
HumidifierMap(
class_name='VeSyncHumid200300S',
dev_types=[
'LUH-A602S-WUSR',
'LUH-A602S-WUS',
'LUH-A602S-WEUR',
'LUH-A602S-WEU',
'LUH-A602S-WJP',
'LUH-A602S-WUSC',
],
features=[WARM_MIST],
mist_modes={
AUTO: 'auto',
SLEEP: 'sleep',
MANUAL: 'manual',
},
mist_levels=list(range(1, 10)),
warm_mist_levels=[0, 1, 2, 3],
device_alias='LV600S',
model_display='LUH-A602S Series',
model_name='LV600S',
setup_entry='LUH-A602S-WUS',
),
HumidifierMap(
class_name='VeSyncHumid200300S',
dev_types=['LUH-O451S-WEU'],
features=[WARM_MIST],
mist_modes={
AUTO: 'auto',
SLEEP: 'sleep',
MANUAL: 'manual',
},
mist_levels=list(range(1, 10)),
warm_mist_levels=list(range(4)),
device_alias='OasisMist 450S EU',
model_name='OasisMist 4.5L',
model_display='LUH-O451S Series',
setup_entry='LUH-O451S-WUS',
),
HumidifierMap(
class_name='VeSyncHumid200300S',
dev_types=[
'LUH-O451S-WUS',
'LUH-O451S-WUSR',
'LUH-O601S-WUS',
'LUH-O601S-KUS',
],
features=[WARM_MIST],
mist_modes={
AUTO: 'auto',
SLEEP: 'sleep',
MANUAL: 'manual',
HUMIDITY: 'humidity',
},
mist_levels=list(range(1, 10)),
warm_mist_levels=list(range(4)),
device_alias='OasisMist 450S',
model_display='OasisMist 4.5L Series',
model_name='OasisMist 4.5L',
setup_entry='LUH-O451S-WUS',
),
HumidifierMap(
class_name='VeSyncHumid1000S',
dev_types=[
'LUH-M101S-WUS',
'LUH-M101S-WEUR',
'LUH-M101S-WUSR',
],
features=[],
mist_modes={
AUTO: 'auto',
SLEEP: 'sleep',
MANUAL: 'manual',
},
mist_levels=list(range(1, 10)),
device_alias='Oasismist 1000S',
model_display='Oasismist Series',
model_name='Oasismist 1000S',
setup_entry='LUH-M101S',
),
HumidifierMap(
class_name='VeSyncSuperior6000S',
dev_types=[
'LEH-S601S-WUS',
'LEH-S601S-WUSR',
'LEH-S601S-WEUR',
],
features=[DRYING_MODE],
mist_modes={
AUTO: 'autoPro',
SLEEP: 'sleep',
HUMIDITY: 'humidity',
MANUAL: 'manual',
AUTOPRO: 'autoPro',
},
mist_levels=list(range(1, 10)),
device_alias='Superior 6000S',
model_display='LEH-S601S Series',
model_name='Superior 6000S',
setup_entry='LEH-S601S',
),
]
List of 'HumidifierMap' configuration objects for humidifier devices.
purifier_modules
module-attribute
↲
purifier_modules: list[PurifierMap] = [
PurifierMap(
class_name='VeSyncAirBypass',
dev_types=[
'Core200S',
'LAP-C201S-AUSR',
'LAP-C202S-WUSR',
],
modes=[SLEEP, MANUAL],
features=[RESET_FILTER, NIGHTLIGHT],
auto_preferences=[DEFAULT, EFFICIENT, QUIET],
fan_levels=list(range(1, 4)),
nightlight_modes=[ON, OFF, DIM],
device_alias='Core 200S',
model_display='Core 200S',
model_name='Core 200S',
setup_entry='Core200S',
),
PurifierMap(
class_name='VeSyncAirBypass',
dev_types=[
'Core300S',
'LAP-C301S-WJP',
'LAP-C302S-WUSB',
'LAP-C301S-WAAA',
'LAP-C302S-WGC',
],
modes=[SLEEP, MANUAL, AUTO],
auto_preferences=[DEFAULT, EFFICIENT, QUIET],
features=[AIR_QUALITY],
fan_levels=list(range(1, 5)),
device_alias='Core 300S',
model_display='Core 300S',
model_name='Core 300S',
setup_entry='Core300S',
),
PurifierMap(
class_name='VeSyncAirBypass',
dev_types=[
'Core400S',
'LAP-C401S-WJP',
'LAP-C401S-WUSR',
'LAP-C401S-WAAA',
],
modes=[SLEEP, MANUAL, AUTO],
features=[AIR_QUALITY],
fan_levels=list(range(1, 5)),
device_alias='Core 400S',
auto_preferences=[DEFAULT, EFFICIENT, QUIET],
model_display='Core 400S',
model_name='Core 400S',
setup_entry='Core400S',
),
PurifierMap(
class_name='VeSyncAirBypass',
dev_types=[
'Core600S',
'LAP-C601S-WUS',
'LAP-C601S-WUSR',
'LAP-C601S-WEU',
],
modes=[SLEEP, MANUAL, AUTO],
features=[AIR_QUALITY],
auto_preferences=[DEFAULT, EFFICIENT, QUIET],
fan_levels=list(range(1, 5)),
device_alias='Core 600S',
model_display='Core 600S',
model_name='Core 600S',
setup_entry='Core600S',
),
PurifierMap(
class_name='VeSyncAir131',
dev_types=['LV-PUR131S', 'LV-RH131S'],
modes=[SLEEP, MANUAL, AUTO],
features=[AIR_QUALITY],
fan_levels=list(range(1, 4)),
device_alias='LV-PUR131S',
model_display='LV-PUR131S/RH131S Series',
model_name='LV131S',
setup_entry='LV-PUR131S',
),
PurifierMap(
class_name='VeSyncAirBaseV2',
dev_types=[
'LAP-V102S-AASR',
'LAP-V102S-WUS',
'LAP-V102S-WEU',
'LAP-V102S-AUSR',
'LAP-V102S-WJP',
'LAP-V102S-AJPR',
'LAP-V102S-AEUR',
],
modes=[SLEEP, MANUAL, AUTO, PET],
features=[AIR_QUALITY],
fan_levels=list(range(1, 5)),
device_alias='Vital 100S',
auto_preferences=[DEFAULT, EFFICIENT, QUIET],
model_display='LAP-V102S Series',
model_name='Vital 100S',
setup_entry='LAP-V102S',
),
PurifierMap(
class_name='VeSyncAirBaseV2',
dev_types=[
'LAP-V201S-AASR',
'LAP-V201S-WJP',
'LAP-V201S-WEU',
'LAP-V201S-WUS',
'LAP-V201-AUSR',
'LAP-V201S-AUSR',
'LAP-V201S-AEUR',
],
modes=[SLEEP, MANUAL, AUTO, PET],
features=[AIR_QUALITY, LIGHT_DETECT],
fan_levels=list(range(1, 5)),
device_alias='Vital 200S',
auto_preferences=[DEFAULT, EFFICIENT, QUIET],
model_display='LAP-V201S Series',
model_name='Vital 200S',
setup_entry='LAP-V201S',
),
PurifierMap(
class_name='VeSyncAirBaseV2',
dev_types=[
'LAP-EL551S-AUS',
'LAP-EL551S-AEUR',
'LAP-EL551S-WEU',
'LAP-EL551S-WUS',
],
modes=[SLEEP, MANUAL, AUTO, TURBO],
features=[AIR_QUALITY, VENT_ANGLE, LIGHT_DETECT],
fan_levels=list(range(1, 4)),
device_alias='Everest Air',
auto_preferences=[DEFAULT, EFFICIENT, QUIET],
model_display='LAP-EL551S Series',
model_name='Everest Air',
setup_entry='EL551S',
),
]
List of 'PurifierMap' configuration objects for purifier devices.
fan_modules
module-attribute
↲
fan_modules: list[FanMap] = [
FanMap(
class_name='VeSyncTowerFan',
dev_types=[
'LTF-F422S-KEU',
'LTF-F422S-WUSR',
'LTF-F422_WJP',
'LTF-F422S-WUS',
],
modes=[
SLEEP,
NORMAL,
MANUAL,
TURBO,
AUTO,
ADVANCED_SLEEP,
],
set_mode_method='setTowerFanMode',
features=[OSCILLATION, DISPLAYING_TYPE, SOUND],
fan_levels=list(range(1, 13)),
device_alias='Tower Fan',
sleep_preferences=[
DEFAULT,
ADVANCED,
TURBO,
EFFICIENT,
QUIET,
],
model_display='LTF-F422S Series',
model_name='Classic 42-Inch Tower Fan',
setup_entry='LTF-F422S',
)
]
List of 'FanMap' configuration objects for fan devices.
air_fryer_modules
module-attribute
↲
air_fryer_modules: list[AirFryerMap] = [
AirFryerMap(
class_name='VeSyncAirFryer158',
module=vesynckitchen,
dev_types=[
'CS137-AF/CS158-AF',
'CS158-AF',
'CS137-AF',
'CS358-AF',
],
device_alias='Air Fryer',
model_display='CS158/159/168/169-AF Series',
model_name='Smart/Pro/Pro Gen 2 5.8 Qt. Air Fryer',
setup_entry='CS137-AF/CS158-AF',
)
]
List of 'AirFryerMap' configuration for air fryer devices.
DeviceMapTemplate
dataclass
↲
Template for DeviceModules mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device. |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
Source code in src\pyvesync\device_map.py
device_alias
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
features
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str,
module: ModuleType,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
) -> None
OutletMap
dataclass
↲
Bases: DeviceMapTemplate
Template for DeviceModules mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device - ProductTypes.OUTLET |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
product_type |
str
|
Product type of the device. |
module |
ModuleType
|
Module for the device. |
nightlight_modes |
list[str]
|
List of nightlight modes for the device. |
Source code in src\pyvesync\device_map.py
product_type
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
module
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
nightlight_modes
class-attribute
instance-attribute
↲
nightlight_modes: list[NightlightModes] = field(
default_factory=list
)
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str = OUTLET,
module: ModuleType = vesyncoutlet,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
nightlight_modes: list[NightlightModes] = list(),
) -> None
SwitchMap
dataclass
↲
Bases: DeviceMapTemplate
Template for DeviceModules mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device - ProductTypes.SWITCH |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
product_type |
str
|
Product type of the device. |
module |
ModuleType
|
Module for the device. |
Source code in src\pyvesync\device_map.py
product_type
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
module
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str = SWITCH,
module: ModuleType = vesyncswitch,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
) -> None
BulbMap
dataclass
↲
Bases: DeviceMapTemplate
Template for DeviceModules mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device - ProductTypes.BULB |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
color_model |
str | None
|
Color model for the device. |
color_modes |
list[str]
|
List of color modes for the device. |
Source code in src\pyvesync\device_map.py
product_type
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
module
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
color_modes
class-attribute
instance-attribute
↲
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str = BULB,
module: ModuleType = vesyncbulb,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
color_model: str | None = None,
color_modes: list[str] = list(),
) -> None
FanMap
dataclass
↲
Bases: DeviceMapTemplate
Template for DeviceModules mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device - ProductTypes.FAN |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
fan_levels |
list[int]
|
List of fan levels for the device. |
modes |
list[str]
|
List of modes for the device. |
sleep_preferences |
list[str]
|
List of sleep preferences for the device. |
set_mode_method |
str
|
Method to set the mode for the device. |
Source code in src\pyvesync\device_map.py
product_type
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
module
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
sleep_preferences
class-attribute
instance-attribute
↲
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str = FAN,
module: ModuleType = vesyncfan,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
fan_levels: list[int] = list(),
modes: list[str] = list(),
sleep_preferences: list[str] = list(),
set_mode_method: str = '',
) -> None
HumidifierMap
dataclass
↲
Bases: DeviceMapTemplate
Template for DeviceModules mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device - ProductTypes.HUMIDIFIER |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
mist_modes |
dict[str, str]
|
Dictionary of mist modes for the device. |
mist_levels |
list[int | str]
|
List of mist levels for the device. |
target_minmax |
tuple[int, int]
|
Minimum and maximum target humidity levels. |
warm_mist_levels |
list[int | str]
|
List of warm mist levels for the device. |
Source code in src\pyvesync\device_map.py
mist_modes
class-attribute
instance-attribute
↲
mist_levels
class-attribute
instance-attribute
↲
product_type
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
module
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
warm_mist_levels
class-attribute
instance-attribute
↲
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str = HUMIDIFIER,
module: ModuleType = vesynchumidifier,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
mist_modes: dict[str, str] = dict(),
mist_levels: list[int | str] = list(),
target_minmax: tuple[int, int] = (30, 80),
warm_mist_levels: list[int | str] = list(),
) -> None
PurifierMap
dataclass
↲
Bases: DeviceMapTemplate
Template for DeviceModules mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device - ProductTypes.PURIFIER |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
fan_levels |
list[int]
|
List of fan levels for the device. |
modes |
list[str]
|
List of modes for the device. |
nightlight_modes |
list[str]
|
List of nightlight modes for the device. |
auto_preferences |
list[str]
|
List of auto preferences for the device. |
Source code in src\pyvesync\device_map.py
product_type
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
module
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
nightlight_modes
class-attribute
instance-attribute
↲
auto_preferences
class-attribute
instance-attribute
↲
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str = PURIFIER,
module: ModuleType = vesyncpurifier,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
fan_levels: list[int] = list(),
modes: list[str] = list(),
nightlight_modes: list[str] = list(),
auto_preferences: list[str] = list(),
) -> None
AirFryerMap
dataclass
↲
Bases: DeviceMapTemplate
Template for DeviceModules mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device - ProductTypes.AIR_FRYER |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
product_type |
str
|
Product type of the device. |
module |
ModuleType
|
Module for the device. |
Source code in src\pyvesync\device_map.py
product_type
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
module
class-attribute
instance-attribute
↲
module: ModuleType = vesynckitchen
Inherited From DeviceMapTemplate
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str = AIR_FRYER,
module: ModuleType = vesynckitchen,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
) -> None
ThermostatMap
dataclass
↲
Bases: DeviceMapTemplate
Template for Thermostat device mapping.
Attributes:
Name | Type | Description |
---|---|---|
dev_types |
list[str]
|
List of device types to match from API. |
class_name |
str
|
Class name of the device. |
product_type |
str
|
Product type of the device. |
module |
ModuleType
|
Module for the device. |
setup_entry |
str
|
Setup entry for the device. |
model_display |
str
|
Display name of the model. |
model_name |
str
|
Name of the model. |
device_alias |
str | None
|
Alias for the device, if any. |
features |
list[str]
|
List of features for the device. |
modes |
list[int]
|
List of modes for the device. |
fan_modes |
list[int]
|
List of fan modes for the device. |
eco_types |
list[int]
|
List of eco types for the device. |
hold_options |
list[int]
|
List of hold options for the device. |
routine_types |
list[int]
|
List of routine types for the device. |
Source code in src\pyvesync\device_map.py
product_type
class-attribute
instance-attribute
↲
Inherited From DeviceMapTemplate
module
class-attribute
instance-attribute
↲
module: ModuleType = vesyncthermostat
Inherited From DeviceMapTemplate
hold_options
class-attribute
instance-attribute
↲
routine_types
class-attribute
instance-attribute
↲
__init__ ↲
__init__(
*,
dev_types: list[str],
class_name: str,
product_type: str = THERMOSTAT,
module: ModuleType = vesyncthermostat,
setup_entry: str,
model_display: str,
model_name: str,
device_alias: str | None = None,
features: list[str] = list(),
modes: list[int] = list(),
fan_modes: list[int] = list(),
eco_types: list[int] = list(),
hold_options: list[int] = list(),
routine_types: list[int] = list(),
) -> None
get_device_config ↲
get_device_config(
device_type: str,
) -> DeviceMapTemplate | None
Get general device details from device type to create instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
Device type to match from device list API call. |
required |
Returns:
Type | Description |
---|---|
DeviceMapTemplate | None
|
DeviceMapTemplate | None: DeviceMapTemplate object or None if not found. |
Source code in src\pyvesync\device_map.py
get_fan ↲
get_fan(device_type: str) -> FanMap | None
Get fan device details from device type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
Device type to match from device list API call. |
required |
Returns:
Type | Description |
---|---|
FanMap | None
|
FanMap | None: FanMap object or None if not found. |
Source code in src\pyvesync\device_map.py
get_purifier ↲
get_purifier(device_type: str) -> PurifierMap | None
Get purifier device details from device type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
Device type to match from device list API call. |
required |
Returns:
Type | Description |
---|---|
PurifierMap | None
|
PurifierMap | None: PurifierMap object or None if not found. |
Source code in src\pyvesync\device_map.py
get_humidifier ↲
get_humidifier(device_type: str) -> HumidifierMap | None
Get humidifier device details from device type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
Device type to match from device list API call. |
required |
Returns:
Type | Description |
---|---|
HumidifierMap | None
|
HumidifierMap | None: HumidifierMap object or None if not found. |
Source code in src\pyvesync\device_map.py
get_outlet ↲
get_outlet(device_type: str) -> OutletMap | None
Get outlet device details from device type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
Device type to match from device list API call. |
required |
Returns:
Type | Description |
---|---|
OutletMap | None
|
OutletMap | None: OutletMap object or None if not found. |
Source code in src\pyvesync\device_map.py
get_switch ↲
get_switch(device_type: str) -> SwitchMap | None
Get switch device details from device type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
Device type to match from device list API call. |
required |
Returns:
Type | Description |
---|---|
SwitchMap | None
|
SwitchMap | None: SwitchMap object or None if not found. |
Source code in src\pyvesync\device_map.py
get_bulb ↲
get_bulb(device_type: str) -> BulbMap | None
Get bulb device details from device type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
Device type to match from device list API call. |
required |
Returns:
Type | Description |
---|---|
BulbMap | None
|
BulbMap | None: BulbMap object or None if not found. |
Source code in src\pyvesync\device_map.py
get_air_fryer ↲
get_air_fryer(device_type: str) -> AirFryerMap | None
Get air fryer device details from device type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
Device type to match from device list API call. |
required |
Returns:
Type | Description |
---|---|
AirFryerMap | None
|
AirFryerMap | None: AirFryerMap object or None if not found. |
Source code in src\pyvesync\device_map.py
get_thermostat ↲
get_thermostat(device_type: str) -> ThermostatMap | None
Get the device map for a thermostat.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
device_type
|
str
|
The device type to match. |
required |
Returns:
Type | Description |
---|---|
ThermostatMap | None
|
ThermostatMap | None: The matching thermostat map or None if not found. |