pyvesync 3.0.0b0__tar.gz → 3.0.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyvesync-3.0.0b0/src/pyvesync.egg-info → pyvesync-3.0.0b1}/PKG-INFO +2 -2
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/README.md +1 -1
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/pyproject.toml +1 -1
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/purifier_base.py +1 -1
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/vesyncbasedevice.py +1 -1
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/device_container.py +1 -1
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/device_map.py +1 -1
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/vesynchumidifier.py +1 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/vesyncpurifier.py +7 -1
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/vesync_models.py +2 -6
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/utils/errors.py +1 -1
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/utils/helpers.py +0 -2
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1/src/pyvesync.egg-info}/PKG-INFO +2 -2
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/LICENSE +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/MANIFEST.in +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/requirements.txt +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/setup.cfg +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/setup.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/__init__.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/__init__.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/bulb_base.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/fan_base.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/fryer_base.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/humidifier_base.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/outlet_base.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/switch_base.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/base_devices/thermostat_base.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/const.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/__init__.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/vesyncbulb.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/vesyncfan.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/vesynckitchen.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/vesyncoutlet.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/vesyncswitch.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/devices/vesyncthermostat.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/__init__.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/base_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/bulb_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/bypass_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/fan_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/fryer_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/home_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/humidifier_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/outlet_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/purifier_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/switch_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/models/thermostat_models.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/utils/__init__.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/utils/colors.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/utils/device_mixins.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/utils/enum_utils.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/utils/logs.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync/vesync.py +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync.egg-info/SOURCES.txt +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync.egg-info/dependency_links.txt +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync.egg-info/requires.txt +0 -0
- {pyvesync-3.0.0b0 → pyvesync-3.0.0b1}/src/pyvesync.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyvesync
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b1
|
|
4
4
|
Summary: pyvesync is a library to manage Etekcity Devices, Cosori Air Fryers, and Levoit Air Purifiers run on the VeSync app.
|
|
5
5
|
Author: Mark Perdue
|
|
6
6
|
Author-email: Joe Trabulsy <webdjoe@gmail.com>
|
|
@@ -340,7 +340,7 @@ manager.devices.outlets = [VeSyncOutletInstances]
|
|
|
340
340
|
manager.devices.switches = [VeSyncSwitchInstances]
|
|
341
341
|
manager.devices.fans = [VeSyncFanInstances]
|
|
342
342
|
manager.devices.bulbs = [VeSyncBulbInstances]
|
|
343
|
-
manager.devices.
|
|
343
|
+
manager.devices.air_purifiers = [VeSyncPurifierInstances]
|
|
344
344
|
manager.devices.humidifiers = [VeSyncHumidifierInstances]
|
|
345
345
|
manager.devices.air_fryers = [VeSyncAirFryerInstances]
|
|
346
346
|
managers.devices.thermostats = [VeSyncThermostatInstances]
|
|
@@ -309,7 +309,7 @@ manager.devices.outlets = [VeSyncOutletInstances]
|
|
|
309
309
|
manager.devices.switches = [VeSyncSwitchInstances]
|
|
310
310
|
manager.devices.fans = [VeSyncFanInstances]
|
|
311
311
|
manager.devices.bulbs = [VeSyncBulbInstances]
|
|
312
|
-
manager.devices.
|
|
312
|
+
manager.devices.air_purifiers = [VeSyncPurifierInstances]
|
|
313
313
|
manager.devices.humidifiers = [VeSyncHumidifierInstances]
|
|
314
314
|
manager.devices.air_fryers = [VeSyncAirFryerInstances]
|
|
315
315
|
managers.devices.thermostats = [VeSyncThermostatInstances]
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyvesync"
|
|
7
|
-
version = "3.0.
|
|
7
|
+
version = "3.0.0b1"
|
|
8
8
|
description = "pyvesync is a library to manage Etekcity Devices, Cosori Air Fryers, and Levoit Air Purifiers run on the VeSync app."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -4,7 +4,7 @@ import logging
|
|
|
4
4
|
from typing import TYPE_CHECKING
|
|
5
5
|
from abc import abstractmethod
|
|
6
6
|
|
|
7
|
-
from
|
|
7
|
+
from typing_extensions import deprecated
|
|
8
8
|
|
|
9
9
|
from pyvesync.base_devices.vesyncbasedevice import VeSyncBaseToggleDevice, DeviceState
|
|
10
10
|
from pyvesync.const import (
|
|
@@ -131,7 +131,7 @@ class VeSyncBaseDevice(ABC, Generic[VS_STATE_T]):
|
|
|
131
131
|
self.current_firm_version = details.currentFirmVersion
|
|
132
132
|
self.device_region: str | None = details.deviceRegion
|
|
133
133
|
self.pid: str | None = None
|
|
134
|
-
self.sub_device_no: int = details.subDeviceNo
|
|
134
|
+
self.sub_device_no: int | None = details.subDeviceNo
|
|
135
135
|
# From feature_map
|
|
136
136
|
self.product_type: str = feature_map.product_type
|
|
137
137
|
self.features: list[str] = feature_map.features
|
|
@@ -184,7 +184,7 @@ class DeviceContainer(_DeviceContainerBase):
|
|
|
184
184
|
if device_obj is not None:
|
|
185
185
|
self.add(device_obj)
|
|
186
186
|
|
|
187
|
-
def device_exists(self, cid: str, sub_device_no: int =
|
|
187
|
+
def device_exists(self, cid: str, sub_device_no: int | None = None) -> bool:
|
|
188
188
|
"""Check if a device with the given cid & sub_dev_no exists.
|
|
189
189
|
|
|
190
190
|
Args:
|
|
@@ -746,7 +746,7 @@ purifier_modules: list[PurifierMap] = [
|
|
|
746
746
|
dev_types=["LV-PUR131S", "LV-RH131S"],
|
|
747
747
|
modes=[PurifierModes.SLEEP, PurifierModes.MANUAL, PurifierModes.AUTO],
|
|
748
748
|
features=[PurifierFeatures.AIR_QUALITY],
|
|
749
|
-
fan_levels=list(range(1,
|
|
749
|
+
fan_levels=list(range(1, 4)),
|
|
750
750
|
device_alias="LV-PUR131S",
|
|
751
751
|
model_display="LV-PUR131S/RH131S Series",
|
|
752
752
|
model_name="LV131S",
|
|
@@ -388,6 +388,7 @@ class VeSyncHumid200S(VeSyncHumid200300S):
|
|
|
388
388
|
return False
|
|
389
389
|
|
|
390
390
|
self.state.display_set_status = DeviceStatus.from_bool(toggle)
|
|
391
|
+
self.state.display_status = DeviceStatus.from_bool(toggle)
|
|
391
392
|
self.state.connection_status = ConnectionStatus.ONLINE
|
|
392
393
|
return True
|
|
393
394
|
|
|
@@ -812,7 +812,7 @@ class VeSyncAir131(BypassV1Mixin, VeSyncPurifier):
|
|
|
812
812
|
self.state.child_lock = bool(DeviceStatus(details.childLock))
|
|
813
813
|
self.state.mode = details.mode
|
|
814
814
|
self.state.fan_level = details.level or 0
|
|
815
|
-
self.state.fan_set_level = details.
|
|
815
|
+
self.state.fan_set_level = details.level or 0
|
|
816
816
|
self.state.set_air_quality_level(details.airQuality)
|
|
817
817
|
|
|
818
818
|
async def get_details(self) -> None:
|
|
@@ -928,6 +928,12 @@ class VeSyncAir131(BypassV1Mixin, VeSyncPurifier):
|
|
|
928
928
|
_LOGGER.debug('Invalid purifier mode used - %s', mode)
|
|
929
929
|
return False
|
|
930
930
|
|
|
931
|
+
if mode == PurifierModes.MANUAL:
|
|
932
|
+
set_level = (
|
|
933
|
+
1 if self.state.fan_set_level in [0, None] else self.state.fan_set_level
|
|
934
|
+
)
|
|
935
|
+
return await self.set_fan_speed(set_level)
|
|
936
|
+
|
|
931
937
|
update_dict = {
|
|
932
938
|
"mode": mode
|
|
933
939
|
}
|
|
@@ -54,7 +54,7 @@ class RequestLoginModel(RequestBaseModel):
|
|
|
54
54
|
class IntRespLoginResultModel(ResponseBaseModel):
|
|
55
55
|
"""Model for the 'result' field in login response containing token and account ID.
|
|
56
56
|
|
|
57
|
-
This class is
|
|
57
|
+
This class is referenced by the `ResponseLoginModel` class.
|
|
58
58
|
"""
|
|
59
59
|
accountID: str
|
|
60
60
|
acceptLanguage: str
|
|
@@ -93,8 +93,6 @@ class ResponseLoginModel(ResponseCodeModel):
|
|
|
93
93
|
```
|
|
94
94
|
"""
|
|
95
95
|
result: IntRespLoginResultModel
|
|
96
|
-
stacktrace: str | None
|
|
97
|
-
module: str | None
|
|
98
96
|
|
|
99
97
|
|
|
100
98
|
@dataclass
|
|
@@ -154,7 +152,7 @@ class ResponseDeviceDetailsModel(ResponseBaseModel):
|
|
|
154
152
|
subDeviceType: str | None
|
|
155
153
|
subDeviceList: None | str
|
|
156
154
|
extension: None | InternalDeviceListExtension
|
|
157
|
-
subDeviceNo: int =
|
|
155
|
+
subDeviceNo: int | None = None
|
|
158
156
|
deviceStatus: str = "off"
|
|
159
157
|
connectionStatus: str = "offline"
|
|
160
158
|
productType: str | None = None
|
|
@@ -182,8 +180,6 @@ class ResponseDeviceDetailsModel(ResponseBaseModel):
|
|
|
182
180
|
"""
|
|
183
181
|
super().__pre_deserialize__(d)
|
|
184
182
|
d = _flatten_device_prop(d)
|
|
185
|
-
if d.get('subDeviceNo') is None:
|
|
186
|
-
d['subDeviceNo'] = 0
|
|
187
183
|
if d.get('cid') is None:
|
|
188
184
|
d['cid'] = d.get('uuid') if d.get('uuid') is not None else d.get("macID")
|
|
189
185
|
return d
|
|
@@ -794,7 +794,7 @@ class VeSyncTokenError(VeSyncError):
|
|
|
794
794
|
|
|
795
795
|
def __init__(self) -> None:
|
|
796
796
|
"""Initialize the exception with a message."""
|
|
797
|
-
super().__init__("Token expired or invalid - please re-authenticate")
|
|
797
|
+
super().__init__("Token expired or invalid - please re-authenticate with login()")
|
|
798
798
|
|
|
799
799
|
|
|
800
800
|
class VeSyncServerError(VeSyncError):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyvesync
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b1
|
|
4
4
|
Summary: pyvesync is a library to manage Etekcity Devices, Cosori Air Fryers, and Levoit Air Purifiers run on the VeSync app.
|
|
5
5
|
Author: Mark Perdue
|
|
6
6
|
Author-email: Joe Trabulsy <webdjoe@gmail.com>
|
|
@@ -340,7 +340,7 @@ manager.devices.outlets = [VeSyncOutletInstances]
|
|
|
340
340
|
manager.devices.switches = [VeSyncSwitchInstances]
|
|
341
341
|
manager.devices.fans = [VeSyncFanInstances]
|
|
342
342
|
manager.devices.bulbs = [VeSyncBulbInstances]
|
|
343
|
-
manager.devices.
|
|
343
|
+
manager.devices.air_purifiers = [VeSyncPurifierInstances]
|
|
344
344
|
manager.devices.humidifiers = [VeSyncHumidifierInstances]
|
|
345
345
|
manager.devices.air_fryers = [VeSyncAirFryerInstances]
|
|
346
346
|
managers.devices.thermostats = [VeSyncThermostatInstances]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|