blueair-api 1.36.3__py3-none-any.whl → 1.36.4__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/http_aws_blueair.py +5 -4
- blueair_api/intermediate_representation_aws.py +6 -2
- {blueair_api-1.36.3.dist-info → blueair_api-1.36.4.dist-info}/METADATA +1 -1
- {blueair_api-1.36.3.dist-info → blueair_api-1.36.4.dist-info}/RECORD +7 -7
- {blueair_api-1.36.3.dist-info → blueair_api-1.36.4.dist-info}/WHEEL +1 -1
- {blueair_api-1.36.3.dist-info → blueair_api-1.36.4.dist-info}/licenses/LICENSE +0 -0
- {blueair_api-1.36.3.dist-info → blueair_api-1.36.4.dist-info}/top_level.txt +0 -0
blueair_api/http_aws_blueair.py
CHANGED
@@ -39,9 +39,10 @@ def request_with_errors(func):
|
|
39
39
|
status_code = response.status
|
40
40
|
try:
|
41
41
|
response_json = await response.json(content_type=None)
|
42
|
-
if
|
43
|
-
|
44
|
-
|
42
|
+
if response_json is not None:
|
43
|
+
if "statusCode" in response_json:
|
44
|
+
_LOGGER.debug("response json found, checking status code from response")
|
45
|
+
status_code = response_json["statusCode"]
|
45
46
|
except Exception as e:
|
46
47
|
_LOGGER.error(f"Error parsing response for errors {e}")
|
47
48
|
raise e
|
@@ -49,7 +50,7 @@ def request_with_errors(func):
|
|
49
50
|
_LOGGER.debug("response 200")
|
50
51
|
return response
|
51
52
|
if 400 <= status_code <= 500:
|
52
|
-
_LOGGER.debug("auth error")
|
53
|
+
_LOGGER.debug(f"auth error, {status_code}")
|
53
54
|
url = kwargs["url"]
|
54
55
|
response_text = await response.text()
|
55
56
|
if "accounts.login" in url:
|
@@ -123,8 +123,12 @@ class SensorRecord:
|
|
123
123
|
|
124
124
|
class SensorHistory(list[SensorRecord]):
|
125
125
|
def __init__(self, response):
|
126
|
-
|
127
|
-
|
126
|
+
if response is None:
|
127
|
+
sensors = []
|
128
|
+
datapoints = []
|
129
|
+
else:
|
130
|
+
sensors = response[0]["sensors"]
|
131
|
+
datapoints = response[0]["datapoints"]
|
128
132
|
sensor_records = []
|
129
133
|
for datapoint in datapoints:
|
130
134
|
values = {}
|
@@ -4,16 +4,16 @@ blueair_api/const.py,sha256=x-2ae2faZqsalYCuqA_ZpGSZSu0_x_rTrvikagnM9PU,1585
|
|
4
4
|
blueair_api/device.py,sha256=4mjoYGOiVGi_yw5ZRnpgwSRcV9q68nseC6VgdCDyWAQ,5554
|
5
5
|
blueair_api/device_aws.py,sha256=Ksc2QDJtntgNEJZfO3tVfHyGwDmnG9YTPZAoJ_UWQdk,10562
|
6
6
|
blueair_api/errors.py,sha256=lJ_iFU_W6zQfGRi_wsMhWDw-fAVPFeCkCbT1erIlYQQ,233
|
7
|
-
blueair_api/http_aws_blueair.py,sha256=
|
7
|
+
blueair_api/http_aws_blueair.py,sha256=pjcrFz7wa_Jn53jo2z0wcpc1tV8rJs3M9jwKS6juWxE,9520
|
8
8
|
blueair_api/http_blueair.py,sha256=IMnKXs9S0Z-t1GVshSItjNr9tTdtXjh7-T-tHpsbzhE,11752
|
9
|
-
blueair_api/intermediate_representation_aws.py,sha256=
|
9
|
+
blueair_api/intermediate_representation_aws.py,sha256=lIvAAvro8UJlBD-kTOW8SNNGcKTuQ2Zp0bmi-MJt7P0,7139
|
10
10
|
blueair_api/model_enum.py,sha256=gH82gAnnxnK7JFIHbfjkFXFA3p_hSmujvvuQ0GQyzm4,494
|
11
11
|
blueair_api/stub.py,sha256=J1BXHUzRR4P32q9WkbucmMqzAjqxS722NSMK4TLZG8o,1176
|
12
12
|
blueair_api/util.py,sha256=2FerJEliR4AQc8nBeAMXb7nyl-CPhUszaHxFcVq4p0s,2105
|
13
13
|
blueair_api/util_bootstrap.py,sha256=oo6qqEYUxWb4wLLivk7ofB0YFrKsTZo5tW0U2wc3-D0,1757
|
14
14
|
blueair_api/util_http.py,sha256=LohO13eBk7_MCfBRg3tMKjLklDTr87RC6Q8vLffwX1M,1464
|
15
|
-
blueair_api-1.36.
|
16
|
-
blueair_api-1.36.
|
17
|
-
blueair_api-1.36.
|
18
|
-
blueair_api-1.36.
|
19
|
-
blueair_api-1.36.
|
15
|
+
blueair_api-1.36.4.dist-info/licenses/LICENSE,sha256=W6UV41yCe1R_Avet8VtsxwdJar18n40b3MRnbEMHZmI,1066
|
16
|
+
blueair_api-1.36.4.dist-info/METADATA,sha256=QrtVZcFB9p6AxvjhI-qqXBS2DqdcnU4twMSG9UJLuYE,2017
|
17
|
+
blueair_api-1.36.4.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
18
|
+
blueair_api-1.36.4.dist-info/top_level.txt,sha256=-gn0jNtmE83qEu70uMW5F4JrXnHGRfuFup1EPWF70oc,12
|
19
|
+
blueair_api-1.36.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|