pyvesync 3.0.0b5__tar.gz → 3.0.0b7__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.0b5/src/pyvesync.egg-info → pyvesync-3.0.0b7}/PKG-INFO +3 -2
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/README.md +2 -2
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/pyproject.toml +2 -1
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/device_map.py +0 -2
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/vesyncfan.py +1 -3
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/vesyncpurifier.py +9 -2
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/fan_models.py +1 -4
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/vesync.py +3 -3
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7/src/pyvesync.egg-info}/PKG-INFO +3 -2
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/LICENSE +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/MANIFEST.in +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/requirements.txt +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/setup.cfg +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/setup.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/__init__.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/__init__.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/bulb_base.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/fan_base.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/fryer_base.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/humidifier_base.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/outlet_base.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/purifier_base.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/switch_base.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/thermostat_base.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/base_devices/vesyncbasedevice.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/const.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/device_container.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/__init__.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/vesyncbulb.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/vesynchumidifier.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/vesynckitchen.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/vesyncoutlet.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/vesyncswitch.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/devices/vesyncthermostat.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/__init__.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/base_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/bulb_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/bypass_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/fryer_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/home_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/humidifier_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/outlet_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/purifier_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/switch_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/thermostat_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/models/vesync_models.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/utils/__init__.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/utils/colors.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/utils/device_mixins.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/utils/enum_utils.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/utils/errors.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/utils/helpers.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/utils/logs.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync/vesynchome.py +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync.egg-info/SOURCES.txt +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync.egg-info/dependency_links.txt +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync.egg-info/requires.txt +0 -0
- {pyvesync-3.0.0b5 → pyvesync-3.0.0b7}/src/pyvesync.egg-info/top_level.txt +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyvesync
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b7
|
|
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>
|
|
7
7
|
License: MIT
|
|
8
8
|
Project-URL: Home Page, https://github.com/webdjoe/pyvesync
|
|
9
|
+
Project-URL: Documentation, https://webdjoe.github.io/pyvesync/latest/
|
|
9
10
|
Keywords: iot,vesync,levoit,etekcity,cosori,valceno
|
|
10
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -98,7 +99,7 @@ async def main():
|
|
|
98
99
|
if not manager.enabled:
|
|
99
100
|
print("Not logged in.")
|
|
100
101
|
return
|
|
101
|
-
await manager.get_devices() # Instantiates supported devices in device list
|
|
102
|
+
await manager.get_devices() # Instantiates supported devices in device list, automatically called by login, only needed if you would like updates
|
|
102
103
|
await manager.update() # Updates the state of all devices
|
|
103
104
|
|
|
104
105
|
# manager.devices is a DeviceContainer object
|
|
@@ -67,7 +67,7 @@ async def main():
|
|
|
67
67
|
if not manager.enabled:
|
|
68
68
|
print("Not logged in.")
|
|
69
69
|
return
|
|
70
|
-
await manager.get_devices() # Instantiates supported devices in device list
|
|
70
|
+
await manager.get_devices() # Instantiates supported devices in device list, automatically called by login, only needed if you would like updates
|
|
71
71
|
await manager.update() # Updates the state of all devices
|
|
72
72
|
|
|
73
73
|
# manager.devices is a DeviceContainer object
|
|
@@ -510,4 +510,4 @@ And to all of those that contributed to the project:
|
|
|
510
510
|
<img src="https://contrib.rocks/image?repo=webdjoe/pyvesync" />
|
|
511
511
|
</a>
|
|
512
512
|
|
|
513
|
-
Made with [contrib.rocks](https://contrib.rocks).
|
|
513
|
+
Made with [contrib.rocks](https://contrib.rocks).
|
|
@@ -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.0b7"
|
|
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"
|
|
@@ -28,6 +28,7 @@ dependencies = [
|
|
|
28
28
|
|
|
29
29
|
[project.urls]
|
|
30
30
|
"Home Page" = "https://github.com/webdjoe/pyvesync"
|
|
31
|
+
"Documentation" = "https://webdjoe.github.io/pyvesync/latest/"
|
|
31
32
|
|
|
32
33
|
[project.optional-dependencies]
|
|
33
34
|
dev = [
|
|
@@ -853,9 +853,7 @@ fan_modules: list[FanMap] = [
|
|
|
853
853
|
class_name="VeSyncTowerFan",
|
|
854
854
|
dev_types=["LTF-F422S-KEU", "LTF-F422S-WUSR", "LTF-F422_WJP", "LTF-F422S-WUS"],
|
|
855
855
|
modes=[
|
|
856
|
-
FanModes.SLEEP, # Alias for Advanced sleep mode
|
|
857
856
|
FanModes.NORMAL,
|
|
858
|
-
FanModes.MANUAL,
|
|
859
857
|
FanModes.TURBO,
|
|
860
858
|
FanModes.AUTO,
|
|
861
859
|
FanModes.ADVANCED_SLEEP,
|
|
@@ -38,9 +38,7 @@ class VeSyncTowerFan(BypassV2Mixin, VeSyncFanBase):
|
|
|
38
38
|
self.state.mode = res.workMode
|
|
39
39
|
self.state.fan_level = res.fanSpeedLevel
|
|
40
40
|
self.state.fan_set_level = res.manualSpeedLevel
|
|
41
|
-
self.state.humidity = res.humidity
|
|
42
41
|
self.state.temperature = res.temperature
|
|
43
|
-
self.state.thermal_comfort = res.thermalComfort
|
|
44
42
|
|
|
45
43
|
self.state.mute_status = DeviceStatus.from_int(res.muteState)
|
|
46
44
|
self.state.mute_set_status = DeviceStatus.from_int(res.muteSwitch)
|
|
@@ -116,7 +114,7 @@ class VeSyncTowerFan(BypassV2Mixin, VeSyncFanBase):
|
|
|
116
114
|
payload_data = {
|
|
117
115
|
"workMode": mode
|
|
118
116
|
}
|
|
119
|
-
r_dict = await self.call_bypassv2_api("
|
|
117
|
+
r_dict = await self.call_bypassv2_api("setTowerFanMode", payload_data)
|
|
120
118
|
r = Helpers.process_dev_response(logger, "set_mode", self, r_dict)
|
|
121
119
|
if r is None:
|
|
122
120
|
return False
|
|
@@ -528,6 +528,10 @@ class VeSyncAirBaseV2(VeSyncAirBypass):
|
|
|
528
528
|
|
|
529
529
|
async def toggle_light_detection(self, toggle: bool | None = None) -> bool:
|
|
530
530
|
"""Enable/Disable Light Detection Feature."""
|
|
531
|
+
if bool(self.state.light_detection_status) == toggle:
|
|
532
|
+
_LOGGER.debug('Light detection is already %s', self.state.light_detection_status)
|
|
533
|
+
return True
|
|
534
|
+
|
|
531
535
|
if toggle is None:
|
|
532
536
|
toggle = not bool(self.state.light_detection_status)
|
|
533
537
|
payload_data = {"lightDetectionSwitch": int(toggle)}
|
|
@@ -536,8 +540,7 @@ class VeSyncAirBaseV2(VeSyncAirBypass):
|
|
|
536
540
|
if r is None:
|
|
537
541
|
return False
|
|
538
542
|
|
|
539
|
-
self.state.light_detection_switch = DeviceStatus.
|
|
540
|
-
else DeviceStatus.OFF
|
|
543
|
+
self.state.light_detection_switch = DeviceStatus.from_bool(toggle)
|
|
541
544
|
self.state.connection_status = ConnectionStatus.ONLINE
|
|
542
545
|
return True
|
|
543
546
|
|
|
@@ -587,6 +590,10 @@ class VeSyncAirBaseV2(VeSyncAirBypass):
|
|
|
587
590
|
return True
|
|
588
591
|
|
|
589
592
|
async def toggle_display(self, mode: bool) -> bool:
|
|
593
|
+
if bool(self.state.light_detection_status):
|
|
594
|
+
_LOGGER.error('Cannot set display when light detection is enabled')
|
|
595
|
+
return False
|
|
596
|
+
|
|
590
597
|
if bool(self.state.display_set_status) == mode:
|
|
591
598
|
_LOGGER.debug('Display is already %s', mode)
|
|
592
599
|
return True
|
|
@@ -15,9 +15,8 @@ from pyvesync.models.bypass_models import (
|
|
|
15
15
|
|
|
16
16
|
@dataclass
|
|
17
17
|
class TowerFanResult(BypassV2InnerResult):
|
|
18
|
-
"""
|
|
18
|
+
"""Tower Fan Result Model."""
|
|
19
19
|
powerSwitch: int
|
|
20
|
-
filterLifePercent: int
|
|
21
20
|
workMode: str
|
|
22
21
|
manualSpeedLevel: int
|
|
23
22
|
fanSpeedLevel: int
|
|
@@ -29,8 +28,6 @@ class TowerFanResult(BypassV2InnerResult):
|
|
|
29
28
|
muteState: int
|
|
30
29
|
timerRemain: int
|
|
31
30
|
temperature: int
|
|
32
|
-
humidity: int
|
|
33
|
-
thermalComfort: int
|
|
34
31
|
errorCode: int
|
|
35
32
|
scheduleCount: int
|
|
36
33
|
displayingType: int | None = None
|
|
@@ -307,7 +307,7 @@ class VeSync: # pylint: disable=function-redefined
|
|
|
307
307
|
|
|
308
308
|
return proc_return
|
|
309
309
|
|
|
310
|
-
async def login(self) ->
|
|
310
|
+
async def login(self) -> None: # pylint: disable=W9006 # pylint mult docstring raises
|
|
311
311
|
"""Log into VeSync server.
|
|
312
312
|
|
|
313
313
|
Username and password are provided when class is instantiated.
|
|
@@ -364,7 +364,7 @@ class VeSync: # pylint: disable=function-redefined
|
|
|
364
364
|
self,
|
|
365
365
|
auth_code: str | None = None,
|
|
366
366
|
region_change_token: str | None = None,
|
|
367
|
-
) ->
|
|
367
|
+
) -> None: # pylint: disable=W9006 # pylint mult docstring raises
|
|
368
368
|
"""Exchanges the authorization code for a token.
|
|
369
369
|
|
|
370
370
|
This completes the login process. If the initial call fails with
|
|
@@ -407,7 +407,7 @@ class VeSync: # pylint: disable=function-redefined
|
|
|
407
407
|
if error_info.error_type == ErrorTypes.CROSS_REGION: # cross region error
|
|
408
408
|
result = response_model.result
|
|
409
409
|
self.country_code = result.countryCode
|
|
410
|
-
await self._login_token(region_change_token=result.bizToken)
|
|
410
|
+
return await self._login_token(region_change_token=result.bizToken)
|
|
411
411
|
resp_message = resp_dict.get('msg')
|
|
412
412
|
if resp_message is not None:
|
|
413
413
|
error_info.message = f'{error_info.message} ({resp_message})'
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyvesync
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b7
|
|
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>
|
|
7
7
|
License: MIT
|
|
8
8
|
Project-URL: Home Page, https://github.com/webdjoe/pyvesync
|
|
9
|
+
Project-URL: Documentation, https://webdjoe.github.io/pyvesync/latest/
|
|
9
10
|
Keywords: iot,vesync,levoit,etekcity,cosori,valceno
|
|
10
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -98,7 +99,7 @@ async def main():
|
|
|
98
99
|
if not manager.enabled:
|
|
99
100
|
print("Not logged in.")
|
|
100
101
|
return
|
|
101
|
-
await manager.get_devices() # Instantiates supported devices in device list
|
|
102
|
+
await manager.get_devices() # Instantiates supported devices in device list, automatically called by login, only needed if you would like updates
|
|
102
103
|
await manager.update() # Updates the state of all devices
|
|
103
104
|
|
|
104
105
|
# manager.devices is a DeviceContainer object
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|