blueair-api 1.36.3__tar.gz → 1.36.5__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.
Files changed (26) hide show
  1. {blueair_api-1.36.3 → blueair_api-1.36.5}/PKG-INFO +1 -1
  2. {blueair_api-1.36.3 → blueair_api-1.36.5}/pyproject.toml +1 -1
  3. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/device_aws.py +1 -1
  4. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/http_aws_blueair.py +5 -4
  5. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/intermediate_representation_aws.py +6 -2
  6. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api.egg-info/PKG-INFO +1 -1
  7. {blueair_api-1.36.3 → blueair_api-1.36.5}/tests/test_device_aws.py +1 -1
  8. {blueair_api-1.36.3 → blueair_api-1.36.5}/LICENSE +0 -0
  9. {blueair_api-1.36.3 → blueair_api-1.36.5}/README.md +0 -0
  10. {blueair_api-1.36.3 → blueair_api-1.36.5}/setup.cfg +0 -0
  11. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/__init__.py +0 -0
  12. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/callbacks.py +0 -0
  13. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/const.py +0 -0
  14. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/device.py +0 -0
  15. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/errors.py +0 -0
  16. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/http_blueair.py +0 -0
  17. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/model_enum.py +0 -0
  18. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/stub.py +0 -0
  19. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/util.py +0 -0
  20. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/util_bootstrap.py +0 -0
  21. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api/util_http.py +0 -0
  22. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api.egg-info/SOURCES.txt +0 -0
  23. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api.egg-info/dependency_links.txt +0 -0
  24. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api.egg-info/requires.txt +0 -0
  25. {blueair_api-1.36.3 → blueair_api-1.36.5}/src/blueair_api.egg-info/top_level.txt +0 -0
  26. {blueair_api-1.36.3 → blueair_api-1.36.5}/tests/test_intermediate_representation_aws.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blueair_api
3
- Version: 1.36.3
3
+ Version: 1.36.5
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
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
8
8
 
9
9
  [project]
10
10
  name = "blueair_api"
11
- version = "1.36.3"
11
+ version = "1.36.5"
12
12
  authors = [
13
13
  { name="Brendan Dahl", email="dahl.brendan@gmail.com" },
14
14
  ]
@@ -258,6 +258,6 @@ class DeviceAws(CallbacksMixin):
258
258
  return ModelEnum.MAX_511I
259
259
  if self.sku == "112124":
260
260
  return ModelEnum.T10I
261
- if self.sku == "109539":
261
+ if self.sku in ["109539", "110034"]:
262
262
  return ModelEnum.MAX_311I_PLUS
263
263
  return ModelEnum.UNKNOWN
@@ -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 "statusCode" in response_json:
43
- _LOGGER.debug("response json found, checking status code from response")
44
- status_code = response_json["statusCode"]
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
- sensors = response[0]["sensors"]
127
- datapoints = response[0]["datapoints"]
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 = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blueair_api
3
- Version: 1.36.3
3
+ Version: 1.36.5
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
@@ -608,7 +608,7 @@ class Protect7470iTest(DeviceAwsTestBase):
608
608
  assert device.cool_sub_mode is NotImplemented
609
609
  assert device.cool_fan_speed is NotImplemented
610
610
  assert device.ap_sub_mode is NotImplemented
611
- assert device.fan_speed_0 is 91
611
+ assert device.fan_speed_0 == 91
612
612
  assert device.temperature_unit is NotImplemented
613
613
 
614
614
 
File without changes
File without changes
File without changes