blueair-api 1.9.5__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.
- {blueair_api-1.9.5/src/blueair_api.egg-info → blueair_api-1.10.0}/PKG-INFO +8 -10
- blueair_api-1.10.0/pyproject.toml +38 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/const.py +5 -6
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/device_aws.py +27 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/util_bootstrap.py +1 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0/src/blueair_api.egg-info}/PKG-INFO +8 -10
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api.egg-info/SOURCES.txt +0 -1
- blueair_api-1.9.5/pyproject.toml +0 -6
- blueair_api-1.9.5/setup.py +0 -39
- {blueair_api-1.9.5 → blueair_api-1.10.0}/LICENSE +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/README.md +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/setup.cfg +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/__init__.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/callbacks.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/device.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/errors.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/http_aws_blueair.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/http_blueair.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/stub.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/util.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api/util_http.py +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api.egg-info/dependency_links.txt +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api.egg-info/requires.txt +0 -0
- {blueair_api-1.9.5 → blueair_api-1.10.0}/src/blueair_api.egg-info/top_level.txt +0 -0
@@ -1,21 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: blueair_api
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.10.0
|
4
4
|
Summary: Blueair Api Wrapper
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Project-URL: Source, https://github.com/dahlb/blueair_api
|
10
|
-
Keywords: blueair,api
|
5
|
+
Author-email: Brendan Dahl <dahl.brendan@gmail.com>
|
6
|
+
Project-URL: Homepage, https://github.com/dahlb/blueair_api
|
7
|
+
Project-URL: Bug Tracker, https://github.com/dahlb/blueair_api/issues
|
8
|
+
Keywords: hatch,rest-mini,api
|
11
9
|
Classifier: Development Status :: 4 - Beta
|
12
|
-
Classifier: Framework :: AsyncIO
|
13
10
|
Classifier: License :: OSI Approved :: MIT License
|
11
|
+
Classifier: Framework :: AsyncIO
|
14
12
|
Classifier: Natural Language :: English
|
15
13
|
Classifier: Intended Audience :: Developers
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
17
15
|
Classifier: Operating System :: MacOS :: MacOS X
|
18
|
-
Requires-Python:
|
16
|
+
Requires-Python: <4,>=3.12.0
|
19
17
|
Description-Content-Type: text/markdown
|
20
18
|
License-File: LICENSE
|
21
19
|
Requires-Dist: aiohttp>=3.8.1
|
@@ -0,0 +1,38 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = [
|
3
|
+
"setuptools>=68.0.0",
|
4
|
+
"wheel",
|
5
|
+
"aiohttp>=3.8.1",
|
6
|
+
]
|
7
|
+
build-backend = "setuptools.build_meta"
|
8
|
+
|
9
|
+
[project]
|
10
|
+
name = "blueair_api"
|
11
|
+
version = "1.10.0"
|
12
|
+
authors = [
|
13
|
+
{ name="Brendan Dahl", email="dahl.brendan@gmail.com" },
|
14
|
+
]
|
15
|
+
description = "Blueair Api Wrapper"
|
16
|
+
readme = "README.md"
|
17
|
+
requires-python = ">=3.12.0, <4"
|
18
|
+
dependencies = [
|
19
|
+
"aiohttp>=3.8.1",
|
20
|
+
]
|
21
|
+
classifiers = [
|
22
|
+
"Development Status :: 4 - Beta",
|
23
|
+
"License :: OSI Approved :: MIT License",
|
24
|
+
"Framework :: AsyncIO",
|
25
|
+
"Natural Language :: English",
|
26
|
+
"Intended Audience :: Developers",
|
27
|
+
"Programming Language :: Python :: 3.12",
|
28
|
+
"Operating System :: MacOS :: MacOS X",
|
29
|
+
]
|
30
|
+
keywords = [
|
31
|
+
"hatch",
|
32
|
+
"rest-mini",
|
33
|
+
"api"
|
34
|
+
]
|
35
|
+
|
36
|
+
[project.urls]
|
37
|
+
"Homepage" = "https://github.com/dahlb/blueair_api"
|
38
|
+
"Bug Tracker" = "https://github.com/dahlb/blueair_api/issues"
|
@@ -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
|
-
|
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):
|
@@ -1,21 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: blueair_api
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.10.0
|
4
4
|
Summary: Blueair Api Wrapper
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Project-URL: Source, https://github.com/dahlb/blueair_api
|
10
|
-
Keywords: blueair,api
|
5
|
+
Author-email: Brendan Dahl <dahl.brendan@gmail.com>
|
6
|
+
Project-URL: Homepage, https://github.com/dahlb/blueair_api
|
7
|
+
Project-URL: Bug Tracker, https://github.com/dahlb/blueair_api/issues
|
8
|
+
Keywords: hatch,rest-mini,api
|
11
9
|
Classifier: Development Status :: 4 - Beta
|
12
|
-
Classifier: Framework :: AsyncIO
|
13
10
|
Classifier: License :: OSI Approved :: MIT License
|
11
|
+
Classifier: Framework :: AsyncIO
|
14
12
|
Classifier: Natural Language :: English
|
15
13
|
Classifier: Intended Audience :: Developers
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
17
15
|
Classifier: Operating System :: MacOS :: MacOS X
|
18
|
-
Requires-Python:
|
16
|
+
Requires-Python: <4,>=3.12.0
|
19
17
|
Description-Content-Type: text/markdown
|
20
18
|
License-File: LICENSE
|
21
19
|
Requires-Dist: aiohttp>=3.8.1
|
blueair_api-1.9.5/pyproject.toml
DELETED
blueair_api-1.9.5/setup.py
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
from setuptools import setup, find_packages
|
2
|
-
import pathlib
|
3
|
-
|
4
|
-
here = pathlib.Path(__file__).parent.resolve()
|
5
|
-
|
6
|
-
# Get the long description from the README file
|
7
|
-
LONG_DESCRIPTION = (here / "README.md").read_text(encoding="utf-8")
|
8
|
-
|
9
|
-
VERSION = "1.9.5"
|
10
|
-
|
11
|
-
# Setting up
|
12
|
-
setup(
|
13
|
-
name="blueair_api",
|
14
|
-
version=VERSION,
|
15
|
-
author="Brendan Dahl",
|
16
|
-
author_email="dahl.brendan@gmail.com",
|
17
|
-
description="Blueair Api Wrapper",
|
18
|
-
long_description=LONG_DESCRIPTION,
|
19
|
-
long_description_content_type="text/markdown",
|
20
|
-
package_dir={"": "src"},
|
21
|
-
packages=find_packages(where="src"),
|
22
|
-
install_requires=["aiohttp>=3.8.1"],
|
23
|
-
keywords=["blueair", "api"],
|
24
|
-
classifiers=[
|
25
|
-
"Development Status :: 4 - Beta",
|
26
|
-
"Framework :: AsyncIO",
|
27
|
-
"License :: OSI Approved :: MIT License",
|
28
|
-
"Natural Language :: English",
|
29
|
-
"Intended Audience :: Developers",
|
30
|
-
"Programming Language :: Python :: 3",
|
31
|
-
"Operating System :: MacOS :: MacOS X",
|
32
|
-
],
|
33
|
-
python_requires=">=3.9, <4",
|
34
|
-
url="https://github.com/dahlb/blueair_api",
|
35
|
-
project_urls={
|
36
|
-
"Bug Reports": "https://github.com/dahlb/blueair_api/issues",
|
37
|
-
"Source": "https://github.com/dahlb/blueair_api",
|
38
|
-
},
|
39
|
-
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|