blueair-api 1.29.0__py3-none-any.whl → 1.30.1__py3-none-any.whl
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/device.py +5 -2
- blueair_api/http_blueair.py +20 -1
- {blueair_api-1.29.0.dist-info → blueair_api-1.30.1.dist-info}/METADATA +1 -1
- {blueair_api-1.29.0.dist-info → blueair_api-1.30.1.dist-info}/RECORD +7 -7
- {blueair_api-1.29.0.dist-info → blueair_api-1.30.1.dist-info}/LICENSE +0 -0
- {blueair_api-1.29.0.dist-info → blueair_api-1.30.1.dist-info}/WHEEL +0 -0
- {blueair_api-1.29.0.dist-info → blueair_api-1.30.1.dist-info}/top_level.txt +0 -0
blueair_api/device.py
CHANGED
@@ -48,7 +48,7 @@ class Device(CallbacksMixin):
|
|
48
48
|
child_lock: bool | None = None
|
49
49
|
night_mode: bool | None = None
|
50
50
|
fan_speed: int | None = None
|
51
|
-
|
51
|
+
fan_auto_mode: bool | None = None
|
52
52
|
filter_expired: bool | None = None
|
53
53
|
wifi_working: bool | None = None
|
54
54
|
|
@@ -85,7 +85,10 @@ class Device(CallbacksMixin):
|
|
85
85
|
self.filter_expired = attributes["filter_status"] != "OK"
|
86
86
|
else:
|
87
87
|
self.filter_expired = NotImplemented
|
88
|
-
|
88
|
+
if "mode" in attributes:
|
89
|
+
self.fan_auto_mode = attributes["mode"] == "auto"
|
90
|
+
else:
|
91
|
+
self.fan_auto_mode = NotImplemented
|
89
92
|
if "wifi_status" in attributes:
|
90
93
|
self.wifi_working = attributes["wifi_status"] == "1"
|
91
94
|
else:
|
blueair_api/http_blueair.py
CHANGED
@@ -7,7 +7,6 @@ import base64
|
|
7
7
|
from .util_http import request_with_logging
|
8
8
|
from .const import API_KEY
|
9
9
|
from .errors import LoginError
|
10
|
-
from typing import Optional
|
11
10
|
|
12
11
|
_LOGGER = logging.getLogger(__name__)
|
13
12
|
|
@@ -295,3 +294,23 @@ class HttpBlueair:
|
|
295
294
|
)
|
296
295
|
)
|
297
296
|
return await response.json()
|
297
|
+
|
298
|
+
async def set_fan_auto_mode(self, device_uuid, auto: bool):
|
299
|
+
url = f"https://{await self.get_home_host()}/v2/device/{device_uuid}/attribute/mode/"
|
300
|
+
new_value = "auto" if auto else "manual"
|
301
|
+
headers = {
|
302
|
+
"X-API-KEY-TOKEN": API_KEY,
|
303
|
+
"X-AUTH-TOKEN": await self.get_auth_token(),
|
304
|
+
}
|
305
|
+
json_body = {
|
306
|
+
"currentValue": new_value,
|
307
|
+
"scope": "device",
|
308
|
+
"name": "mode",
|
309
|
+
"uuid": str(device_uuid),
|
310
|
+
}
|
311
|
+
response: ClientResponse = (
|
312
|
+
await self._post_request_with_logging_and_errors_raised(
|
313
|
+
url=url, json_body=json_body, headers=headers
|
314
|
+
)
|
315
|
+
)
|
316
|
+
return await response.json()
|
@@ -1,19 +1,19 @@
|
|
1
1
|
blueair_api/__init__.py,sha256=GucsIENhTF4AVxPn4Xyr4imUxJJ8RO8RYt1opHCF2hQ,326
|
2
2
|
blueair_api/callbacks.py,sha256=fvrJsqH5eDRxWOGWiZkF2uLU4n2ve0zzU17ERqWbHP8,756
|
3
3
|
blueair_api/const.py,sha256=q1smSEhwyYvuQiR867lToFm-mGV-d3dNJvN0NJgscbU,1037
|
4
|
-
blueair_api/device.py,sha256=
|
4
|
+
blueair_api/device.py,sha256=4pVLeU3SYIyXZH_LKk1deNuAZtO-lV8UebIT1OqNAR8,4630
|
5
5
|
blueair_api/device_aws.py,sha256=W9twRSyH_PZPWQE_m2mPN--9sxnps_hK4obvf2SOie0,7122
|
6
6
|
blueair_api/errors.py,sha256=lJ_iFU_W6zQfGRi_wsMhWDw-fAVPFeCkCbT1erIlYQQ,233
|
7
7
|
blueair_api/http_aws_blueair.py,sha256=jztGyoH0iC7aCJ2oGf9hnEeHFOie3YikFvwtWo3W2w4,8536
|
8
|
-
blueair_api/http_blueair.py,sha256=
|
8
|
+
blueair_api/http_blueair.py,sha256=IMnKXs9S0Z-t1GVshSItjNr9tTdtXjh7-T-tHpsbzhE,11752
|
9
9
|
blueair_api/intermediate_representation_aws.py,sha256=DJWxHFP9yVll0O6kxHWjKscIlu-7genc3f7ZvwV5YdA,6137
|
10
10
|
blueair_api/model_enum.py,sha256=Z9Ne4icNEjbGNwdHJZSDibcKJKwv-W1BRpZx01RGFuY,2480
|
11
11
|
blueair_api/stub.py,sha256=tWJJLIhKf39P1gRAXfJk6L8cBJI9fVK3Uk9pj2_Teaw,1187
|
12
12
|
blueair_api/util.py,sha256=7MrB2DLqUVOlBQuhv7bRmUXvcGcsjXiV3M0H3LloiOo,1962
|
13
13
|
blueair_api/util_bootstrap.py,sha256=oo6qqEYUxWb4wLLivk7ofB0YFrKsTZo5tW0U2wc3-D0,1757
|
14
14
|
blueair_api/util_http.py,sha256=45AJG3Vb6LMVzI0WV22AoSyt64f_Jj3KpOAwF5M6EFE,1327
|
15
|
-
blueair_api-1.
|
16
|
-
blueair_api-1.
|
17
|
-
blueair_api-1.
|
18
|
-
blueair_api-1.
|
19
|
-
blueair_api-1.
|
15
|
+
blueair_api-1.30.1.dist-info/LICENSE,sha256=W6UV41yCe1R_Avet8VtsxwdJar18n40b3MRnbEMHZmI,1066
|
16
|
+
blueair_api-1.30.1.dist-info/METADATA,sha256=LGA1xL41wx6M3o2fdOEIXGRI2hV-11dM6_rGQTQRcM4,1995
|
17
|
+
blueair_api-1.30.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
18
|
+
blueair_api-1.30.1.dist-info/top_level.txt,sha256=-gn0jNtmE83qEu70uMW5F4JrXnHGRfuFup1EPWF70oc,12
|
19
|
+
blueair_api-1.30.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|