blueair-api 1.29.0__py3-none-any.whl → 1.30.0__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.
@@ -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_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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: blueair_api
3
- Version: 1.29.0
3
+ Version: 1.30.0
4
4
  Summary: Blueair Api Wrapper
5
5
  Author-email: Brendan Dahl <dahl.brendan@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/dahlb/blueair_api
@@ -5,15 +5,15 @@ blueair_api/device.py,sha256=tMA2pW5tSN_5uKlE7DypGQiQ-u333s-ErKVMjYTOBOs,4530
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=Ms-tDcGaTb8-Zg1Sw68aVoU6QP2ba2JQWT31_g1jUMk,11048
8
+ blueair_api/http_blueair.py,sha256=eH9nwrv-QdmurZwrKLzIkbemJlU-p7H9za2pSQgEM50,11747
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.29.0.dist-info/LICENSE,sha256=W6UV41yCe1R_Avet8VtsxwdJar18n40b3MRnbEMHZmI,1066
16
- blueair_api-1.29.0.dist-info/METADATA,sha256=x0Gn1QLoLBoyUegk4McrPEYSvHduU9ZncbzLPpYrEyI,1995
17
- blueair_api-1.29.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
18
- blueair_api-1.29.0.dist-info/top_level.txt,sha256=-gn0jNtmE83qEu70uMW5F4JrXnHGRfuFup1EPWF70oc,12
19
- blueair_api-1.29.0.dist-info/RECORD,,
15
+ blueair_api-1.30.0.dist-info/LICENSE,sha256=W6UV41yCe1R_Avet8VtsxwdJar18n40b3MRnbEMHZmI,1066
16
+ blueair_api-1.30.0.dist-info/METADATA,sha256=exaefi2U99qful1oc90IBbBj7A-wU6rEoLDtEV107TI,1995
17
+ blueair_api-1.30.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
18
+ blueair_api-1.30.0.dist-info/top_level.txt,sha256=-gn0jNtmE83qEu70uMW5F4JrXnHGRfuFup1EPWF70oc,12
19
+ blueair_api-1.30.0.dist-info/RECORD,,