blueair-api 1.28.0__tar.gz → 1.29.0__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.
- {blueair_api-1.28.0 → blueair_api-1.29.0}/PKG-INFO +1 -1
- {blueair_api-1.28.0 → blueair_api-1.29.0}/pyproject.toml +1 -1
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/device.py +1 -4
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/device_aws.py +5 -11
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/stub.py +1 -5
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/util_bootstrap.py +1 -1
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api.egg-info/PKG-INFO +1 -1
- {blueair_api-1.28.0 → blueair_api-1.29.0}/tests/test_device_aws.py +8 -11
- {blueair_api-1.28.0 → blueair_api-1.29.0}/LICENSE +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/README.md +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/setup.cfg +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/__init__.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/callbacks.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/const.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/errors.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/http_aws_blueair.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/http_blueair.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/intermediate_representation_aws.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/model_enum.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/util.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/util_http.py +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api.egg-info/SOURCES.txt +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api.egg-info/dependency_links.txt +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api.egg-info/requires.txt +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api.egg-info/top_level.txt +0 -0
- {blueair_api-1.28.0 → blueair_api-1.29.0}/tests/test_intermediate_representation_aws.py +0 -0
@@ -85,10 +85,7 @@ class Device(CallbacksMixin):
|
|
85
85
|
self.filter_expired = attributes["filter_status"] != "OK"
|
86
86
|
else:
|
87
87
|
self.filter_expired = NotImplemented
|
88
|
-
|
89
|
-
self.fan_mode = attributes["mode"]
|
90
|
-
else:
|
91
|
-
self.fan_mode = NotImplemented
|
88
|
+
self.fan_mode = attributes.get("mode", NotImplemented)
|
92
89
|
if "wifi_status" in attributes:
|
93
90
|
self.wifi_working = attributes["wifi_status"] == "1"
|
94
91
|
else:
|
@@ -138,17 +138,6 @@ class DeviceAws(CallbacksMixin):
|
|
138
138
|
await self.api.set_device_info(self.uuid, "standby", "vb", value)
|
139
139
|
self.publish_updates()
|
140
140
|
|
141
|
-
# FIXME: avoid state translation at the API level and depreate running.
|
142
|
-
# replace with standby which is standard across aws devices.
|
143
|
-
@property
|
144
|
-
def running(self) -> AttributeType[bool]:
|
145
|
-
if self.standby is None or self.standby is NotImplemented:
|
146
|
-
return self.standby
|
147
|
-
return not self.standby
|
148
|
-
|
149
|
-
async def set_running(self, running: bool):
|
150
|
-
await self.set_standby(not running)
|
151
|
-
|
152
141
|
async def set_fan_auto_mode(self, fan_auto_mode: bool):
|
153
142
|
self.fan_auto_mode = fan_auto_mode
|
154
143
|
await self.api.set_device_info(self.uuid, "automode", "vb", fan_auto_mode)
|
@@ -174,6 +163,11 @@ class DeviceAws(CallbacksMixin):
|
|
174
163
|
await self.api.set_device_info(self.uuid, "wickdrys", "vb", value)
|
175
164
|
self.publish_updates()
|
176
165
|
|
166
|
+
async def set_germ_shield(self, value: bool):
|
167
|
+
self.germ_shield = value
|
168
|
+
await self.api.set_device_info(self.uuid, "germshield", "vb", value)
|
169
|
+
self.publish_updates()
|
170
|
+
|
177
171
|
@property
|
178
172
|
def model(self) -> ModelEnum:
|
179
173
|
if self.sku == "111633":
|
@@ -1,17 +1,14 @@
|
|
1
1
|
# run with "python3 src/blueair_api/stub.py"
|
2
2
|
import logging
|
3
3
|
import asyncio
|
4
|
-
from threading import Event
|
5
4
|
|
6
5
|
from getpass import getpass
|
7
6
|
from pathlib import Path
|
8
7
|
import sys
|
9
8
|
|
10
|
-
# import blueair_api
|
11
|
-
|
12
9
|
path_root = Path(__file__).parents[2]
|
13
10
|
sys.path.append(str(path_root))
|
14
|
-
from src.blueair_api import get_devices, get_aws_devices
|
11
|
+
from src.blueair_api import get_devices, get_aws_devices, DeviceAws
|
15
12
|
|
16
13
|
|
17
14
|
logger = logging.getLogger("src.blueair_api")
|
@@ -30,7 +27,6 @@ async def testing():
|
|
30
27
|
api, devices = await get_aws_devices(username=username, password=password)
|
31
28
|
for device in devices:
|
32
29
|
await device.refresh()
|
33
|
-
await device.set_child_lock(True)
|
34
30
|
logger.debug(device)
|
35
31
|
finally:
|
36
32
|
if api:
|
@@ -45,7 +45,7 @@ async def get_aws_devices(
|
|
45
45
|
password: str,
|
46
46
|
region: str = "us",
|
47
47
|
client_session: ClientSession | None = None,
|
48
|
-
) -> tuple[HttpAwsBlueair, list[
|
48
|
+
) -> tuple[HttpAwsBlueair, list[DeviceAws]]:
|
49
49
|
api = HttpAwsBlueair(
|
50
50
|
username=username,
|
51
51
|
password=password,
|
@@ -112,6 +112,7 @@ class DeviceAwsSetterTest(DeviceAwsTestBase):
|
|
112
112
|
"brightness": fake,
|
113
113
|
"fanspeed": fake,
|
114
114
|
"standby": fake,
|
115
|
+
"germshield": fake,
|
115
116
|
"automode": fake,
|
116
117
|
"autorh": fake,
|
117
118
|
"childlock": fake,
|
@@ -143,17 +144,17 @@ class DeviceAwsSetterTest(DeviceAwsTestBase):
|
|
143
144
|
await self.device.refresh()
|
144
145
|
assert self.device.fan_speed == 2
|
145
146
|
|
146
|
-
async def
|
147
|
+
async def test_germ_shield(self):
|
147
148
|
# test cache works
|
148
|
-
self.device.
|
149
|
-
await self.device.
|
150
|
-
assert self.device.
|
149
|
+
self.device.germ_shield = None
|
150
|
+
await self.device.set_germ_shield(False)
|
151
|
+
assert self.device.germ_shield is False
|
151
152
|
|
152
153
|
# test refresh works
|
153
|
-
await self.device.
|
154
|
-
self.device.
|
154
|
+
await self.device.set_germ_shield(True)
|
155
|
+
self.device.germ_shield = None
|
155
156
|
await self.device.refresh()
|
156
|
-
assert self.device.
|
157
|
+
assert self.device.germ_shield is True
|
157
158
|
|
158
159
|
async def test_standby(self):
|
159
160
|
# test cache works
|
@@ -258,7 +259,6 @@ class EmptyDeviceAwsTest(DeviceAwsTestBase):
|
|
258
259
|
assert device.serial_number is NotImplemented
|
259
260
|
assert device.sku is NotImplemented
|
260
261
|
|
261
|
-
assert device.running is NotImplemented
|
262
262
|
assert device.standby is NotImplemented
|
263
263
|
assert device.night_mode is NotImplemented
|
264
264
|
assert device.germ_shield is NotImplemented
|
@@ -304,7 +304,6 @@ class H35iTest(DeviceAwsTestBase):
|
|
304
304
|
assert device.serial_number == "111163300201110210004036"
|
305
305
|
assert device.sku == "111633"
|
306
306
|
|
307
|
-
assert device.running is True
|
308
307
|
assert device.standby is False
|
309
308
|
assert device.night_mode is False
|
310
309
|
assert device.germ_shield is NotImplemented
|
@@ -350,7 +349,6 @@ class T10iTest(DeviceAwsTestBase):
|
|
350
349
|
assert device.serial_number == "111212400002313210001961"
|
351
350
|
assert device.sku == "112124"
|
352
351
|
|
353
|
-
assert device.running is True
|
354
352
|
assert device.standby is False
|
355
353
|
assert device.night_mode is NotImplemented
|
356
354
|
assert device.germ_shield is NotImplemented
|
@@ -396,7 +394,6 @@ class Protect7470iTest(DeviceAwsTestBase):
|
|
396
394
|
assert device.serial_number == "110582600000110110016855"
|
397
395
|
assert device.sku == "105826"
|
398
396
|
|
399
|
-
assert device.running is True
|
400
397
|
assert device.standby is False
|
401
398
|
assert device.night_mode is False
|
402
399
|
assert device.germ_shield is True
|
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
|
{blueair_api-1.28.0 → blueair_api-1.29.0}/src/blueair_api/intermediate_representation_aws.py
RENAMED
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
|