blueair-api 1.9.6__tar.gz → 1.10.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.
Files changed (22) hide show
  1. {blueair_api-1.9.6 → blueair_api-1.10.0}/PKG-INFO +1 -1
  2. {blueair_api-1.9.6 → blueair_api-1.10.0}/pyproject.toml +1 -1
  3. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/const.py +5 -6
  4. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/device_aws.py +27 -0
  5. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/util_bootstrap.py +1 -0
  6. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api.egg-info/PKG-INFO +1 -1
  7. {blueair_api-1.9.6 → blueair_api-1.10.0}/LICENSE +0 -0
  8. {blueair_api-1.9.6 → blueair_api-1.10.0}/README.md +0 -0
  9. {blueair_api-1.9.6 → blueair_api-1.10.0}/setup.cfg +0 -0
  10. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/__init__.py +0 -0
  11. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/callbacks.py +0 -0
  12. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/device.py +0 -0
  13. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/errors.py +0 -0
  14. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/http_aws_blueair.py +0 -0
  15. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/http_blueair.py +0 -0
  16. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/stub.py +0 -0
  17. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/util.py +0 -0
  18. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api/util_http.py +0 -0
  19. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api.egg-info/SOURCES.txt +0 -0
  20. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api.egg-info/dependency_links.txt +0 -0
  21. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api.egg-info/requires.txt +0 -0
  22. {blueair_api-1.9.6 → blueair_api-1.10.0}/src/blueair_api.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: blueair_api
3
- Version: 1.9.6
3
+ Version: 1.10.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
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
8
8
 
9
9
  [project]
10
10
  name = "blueair_api"
11
- version = "1.9.6"
11
+ version = "1.10.0"
12
12
  authors = [
13
13
  { name="Brendan Dahl", email="dahl.brendan@gmail.com" },
14
14
  ]
@@ -1,4 +1,3 @@
1
- from typing import Union
2
1
  from collections.abc import Mapping
3
2
  from typing_extensions import TypedDict
4
3
 
@@ -11,12 +10,12 @@ SENSITIVE_FIELD_NAMES = [
11
10
  # The BlueAir API uses a fixed API key.
12
11
  API_KEY = "eyJhbGciOiJIUzI1NiJ9.eyJncmFudGVlIjoiYmx1ZWFpciIsImlhdCI6MTQ1MzEyNTYzMiwidmFsaWRpdHkiOi0xLCJqdGkiOiJkNmY3OGE0Yi1iMWNkLTRkZDgtOTA2Yi1kN2JkNzM0MTQ2NzQiLCJwZXJtaXNzaW9ucyI6WyJhbGwiXSwicXVvdGEiOi0xLCJyYXRlTGltaXQiOi0xfQ.CJsfWVzFKKDDA6rWdh-hjVVVE9S3d6Hu9BzXG9htWFw" # noqa: E501
13
12
 
14
- MeasurementBundle = TypedDict(
15
- "MeasurementBundle",
16
- {"sensors": list[str], "datapoints": list[list[Union[int, float]]]},
17
- )
18
13
 
19
- MeasurementList = list[Mapping[str, Union[int, float]]]
14
+ class MeasurementBundle(TypedDict):
15
+ sensors: list[str]
16
+ datapoints: list[list[int | float]]
17
+
18
+ MeasurementList = list[Mapping[str, int | float]]
20
19
 
21
20
  AWS_APIKEYS = {
22
21
  "us": {
@@ -33,17 +33,25 @@ class DeviceAws(CallbacksMixin):
33
33
  filter_usage: int = None # percentage
34
34
  wifi_working: bool = None
35
35
 
36
+ # i35
37
+ wick_usage: int = None # percentage
38
+ wick_dry_mode: bool = None
39
+ wshortage: bool = None
40
+ auto_regulated_humidity: int = None
41
+
36
42
  def __init__(
37
43
  self,
38
44
  api: HttpAwsBlueair,
39
45
  uuid: str = None,
40
46
  name_api: str = None,
41
47
  mac: str = None,
48
+ type_name: str = None,
42
49
  ):
43
50
  self.api = api
44
51
  self.uuid = uuid
45
52
  self.name_api = name_api
46
53
  self.mac = mac
54
+ self.type_name = type_name
47
55
  _LOGGER.debug(f"creating blueair device aws: {self.uuid}")
48
56
 
49
57
  async def refresh(self):
@@ -71,6 +79,10 @@ class DeviceAws(CallbacksMixin):
71
79
  self.fan_auto_mode = safely_get_json_value(states, "automode", bool)
72
80
  self.filter_usage = safely_get_json_value(states, "filterusage", int)
73
81
  self.wifi_working = safely_get_json_value(states, "online", bool)
82
+ self.wick_usage = safely_get_json_value(states, "wickusage", int)
83
+ self.wick_dry_mode = safely_get_json_value(states, "wickdrys", bool)
84
+ self.auto_regulated_humidity = safely_get_json_value(states, "autorh", int)
85
+ self.water_shortage = safely_get_json_value(states, "wshortage", bool)
74
86
 
75
87
  self.publish_updates()
76
88
 
@@ -94,6 +106,11 @@ class DeviceAws(CallbacksMixin):
94
106
  await self.api.set_device_info(self.uuid, "automode", "vb", fan_auto_mode)
95
107
  self.publish_updates()
96
108
 
109
+ async def set_auto_regulated_humidity(self, value: int):
110
+ self.auto_regulated_humidity = value
111
+ await self.api.set_device_info(self.uuid, "autorh", "v", value)
112
+ self.publish_updates()
113
+
97
114
  async def set_child_lock(self, child_lock: bool):
98
115
  self.child_lock = child_lock
99
116
  await self.api.set_device_info(self.uuid, "childlock", "vb", child_lock)
@@ -104,10 +121,16 @@ class DeviceAws(CallbacksMixin):
104
121
  await self.api.set_device_info(self.uuid, "nightmode", "vb", night_mode)
105
122
  self.publish_updates()
106
123
 
124
+ async def set_wick_dry_mode(self, value: bool):
125
+ self.wick_dry_mode = value
126
+ await self.api.set_device_info(self.uuid, "wickdrys", "vb", value)
127
+ self.publish_updates()
128
+
107
129
  def __repr__(self):
108
130
  return {
109
131
  "uuid": self.uuid,
110
132
  "name": self.name,
133
+ "type_name": self.type_name,
111
134
  "name_api": self.name_api,
112
135
  "mac": self.mac,
113
136
  "firmware": self.firmware,
@@ -127,6 +150,10 @@ class DeviceAws(CallbacksMixin):
127
150
  "temperature": self.temperature,
128
151
  "humidity": self.humidity,
129
152
  "filter_usage": self.filter_usage,
153
+ "wick_usage": self.wick_usage,
154
+ "wick_dry_mode": self.wick_dry_mode,
155
+ "auto_regulated_humidity": self.auto_regulated_humidity,
156
+ "water_shortage": self.water_shortage,
130
157
  }
131
158
 
132
159
  def __str__(self):
@@ -32,6 +32,7 @@ async def get_devices(
32
32
  uuid=device["uuid"],
33
33
  name=device["name"],
34
34
  mac=device["mac"],
35
+ type_name=device["type"],
35
36
  )
36
37
 
37
38
  devices = map(create_device, api_devices)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: blueair_api
3
- Version: 1.9.6
3
+ Version: 1.10.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
File without changes
File without changes
File without changes