blueair-api 1.31.3__tar.gz → 1.33.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.31.3 → blueair_api-1.33.0}/PKG-INFO +1 -1
- {blueair_api-1.31.3 → blueair_api-1.33.0}/pyproject.toml +1 -1
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/device_aws.py +61 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api.egg-info/PKG-INFO +1 -1
- {blueair_api-1.31.3 → blueair_api-1.33.0}/tests/test_device_aws.py +149 -10
- {blueair_api-1.31.3 → blueair_api-1.33.0}/LICENSE +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/README.md +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/setup.cfg +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/__init__.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/callbacks.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/const.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/device.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/errors.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/http_aws_blueair.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/http_blueair.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/intermediate_representation_aws.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/model_enum.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/stub.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/util.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/util_bootstrap.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/util_http.py +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api.egg-info/SOURCES.txt +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api.egg-info/dependency_links.txt +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api.egg-info/requires.txt +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api.egg-info/top_level.txt +0 -0
- {blueair_api-1.31.3 → blueair_api-1.33.0}/tests/test_intermediate_representation_aws.py +0 -0
@@ -66,6 +66,16 @@ class DeviceAws(CallbacksMixin):
|
|
66
66
|
water_shortage : AttributeType[bool] = None
|
67
67
|
auto_regulated_humidity : AttributeType[int] = None
|
68
68
|
|
69
|
+
main_mode: AttributeType[int] = None # api value 0 purify only, 1 heat on, 2 cool on
|
70
|
+
heat_sub_mode: AttributeType[int] = None # api value 1 heat on, 2 heat on with fan auto
|
71
|
+
heat_fan_speed: AttributeType[int] = None # api value 11/37/64/91
|
72
|
+
heat_temp: AttributeType[int] = None # api value is celsius * 10
|
73
|
+
cool_sub_mode: AttributeType[int] = None # api value 1 cool on, 2 cool on with fan auto
|
74
|
+
cool_fan_speed: AttributeType[int] = None # api value 11/37/64/91
|
75
|
+
ap_sub_mode: AttributeType[int] = None # api value 1 manual speeed, 2 auto fan speed
|
76
|
+
fan_speed_0: AttributeType[int] = None # api value 11/37/64/91
|
77
|
+
temperature_unit: AttributeType[int] = None # api value of 1 is celcius
|
78
|
+
|
69
79
|
async def refresh(self):
|
70
80
|
_LOGGER.debug(f"refreshing blueair device aws: {self}")
|
71
81
|
self.raw_info = await self.api.device_info(self.name_api, self.uuid)
|
@@ -117,11 +127,22 @@ class DeviceAws(CallbacksMixin):
|
|
117
127
|
self.fan_speed = states_safe_get("fanspeed")
|
118
128
|
self.fan_auto_mode = states_safe_get("automode")
|
119
129
|
self.filter_usage_percentage = states_safe_get("filterusage")
|
130
|
+
|
120
131
|
self.wick_usage_percentage = states_safe_get("wickusage")
|
121
132
|
self.wick_dry_mode = states_safe_get("wickdrys")
|
122
133
|
self.auto_regulated_humidity = states_safe_get("autorh")
|
123
134
|
self.water_shortage = states_safe_get("wshortage")
|
124
135
|
|
136
|
+
self.main_mode = states_safe_get("mainmode")
|
137
|
+
self.heat_temp = states_safe_get("heattemp")
|
138
|
+
self.heat_sub_mode = states_safe_get("heatsubmode")
|
139
|
+
self.heat_fan_speed = states_safe_get("heatfs")
|
140
|
+
self.cool_sub_mode = states_safe_get("coolsubmode")
|
141
|
+
self.cool_fan_speed = states_safe_get("coolfs")
|
142
|
+
self.ap_sub_mode = states_safe_get("apsubmode")
|
143
|
+
self.fan_speed_0 = states_safe_get("fsp0")
|
144
|
+
self.temperature_unit = states_safe_get("tu")
|
145
|
+
|
125
146
|
self.publish_updates()
|
126
147
|
_LOGGER.debug(f"refreshed blueair device aws: {self}")
|
127
148
|
|
@@ -170,6 +191,46 @@ class DeviceAws(CallbacksMixin):
|
|
170
191
|
await self.api.set_device_info(self.uuid, "germshield", "vb", value)
|
171
192
|
self.publish_updates()
|
172
193
|
|
194
|
+
async def set_main_mode(self, value: int):
|
195
|
+
self.main_mode = value
|
196
|
+
await self.api.set_device_info(self.uuid, "mainmode", "v", value)
|
197
|
+
self.publish_updates()
|
198
|
+
|
199
|
+
async def set_heat_temp(self, value: int):
|
200
|
+
self.heat_temp = value
|
201
|
+
await self.api.set_device_info(self.uuid, "heattemp", "v", value)
|
202
|
+
self.publish_updates()
|
203
|
+
|
204
|
+
async def set_heat_sub_mode(self, value: int):
|
205
|
+
self.heat_sub_mode = value
|
206
|
+
await self.api.set_device_info(self.uuid, "heatsubmode", "v", value)
|
207
|
+
self.publish_updates()
|
208
|
+
|
209
|
+
async def set_heat_fan_speed(self, value: int):
|
210
|
+
self.heat_fan_speed = value
|
211
|
+
await self.api.set_device_info(self.uuid, "heatfs", "v", value)
|
212
|
+
self.publish_updates()
|
213
|
+
|
214
|
+
async def set_cool_sub_mode(self, value: int):
|
215
|
+
self.cool_sub_mode = value
|
216
|
+
await self.api.set_device_info(self.uuid, "coolsubmode", "v", value)
|
217
|
+
self.publish_updates()
|
218
|
+
|
219
|
+
async def set_cool_fan_speed(self, value: int):
|
220
|
+
self.cool_fan_speed = value
|
221
|
+
await self.api.set_device_info(self.uuid, "coolfs", "v", value)
|
222
|
+
self.publish_updates()
|
223
|
+
|
224
|
+
async def set_ap_sub_mode(self, value: int):
|
225
|
+
self.ap_sub_mode = value
|
226
|
+
await self.api.set_device_info(self.uuid, "apsubmode", "v", value)
|
227
|
+
self.publish_updates()
|
228
|
+
|
229
|
+
async def set_fan_speed_0(self, value: int):
|
230
|
+
self.fan_speed_0 = value
|
231
|
+
await self.api.set_device_info(self.uuid, "fsp0", "v", value)
|
232
|
+
self.publish_updates()
|
233
|
+
|
173
234
|
@property
|
174
235
|
def model(self) -> ModelEnum:
|
175
236
|
if self.sku == "111633":
|
@@ -109,15 +109,23 @@ class DeviceAwsSetterTest(DeviceAwsTestBase):
|
|
109
109
|
# minimally populate dc to define the states.
|
110
110
|
fake = {"n": "n", "v": 0}
|
111
111
|
ir.query_json(self.device_info_helper.info, "configuration.dc").update({
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
112
|
+
"brightness": fake,
|
113
|
+
"fanspeed": fake,
|
114
|
+
"standby": fake,
|
115
|
+
"germshield": fake,
|
116
|
+
"automode": fake,
|
117
|
+
"autorh": fake,
|
118
|
+
"childlock": fake,
|
119
|
+
"nightmode": fake,
|
120
|
+
"wickdrys": fake,
|
121
|
+
"mainmode": fake,
|
122
|
+
"heattemp": fake,
|
123
|
+
"heatsubmode": fake,
|
124
|
+
"heatfs": fake,
|
125
|
+
"coolsubmode": fake,
|
126
|
+
"coolfs": fake,
|
127
|
+
"apsubmode": fake,
|
128
|
+
"fsp0": fake,
|
121
129
|
})
|
122
130
|
|
123
131
|
async def test_brightness(self):
|
@@ -228,6 +236,102 @@ class DeviceAwsSetterTest(DeviceAwsTestBase):
|
|
228
236
|
await self.device.refresh()
|
229
237
|
assert self.device.wick_dry_mode is True
|
230
238
|
|
239
|
+
async def test_main_mode(self):
|
240
|
+
# test cache works
|
241
|
+
self.device.main_mode = None
|
242
|
+
await self.device.set_main_mode(1)
|
243
|
+
assert self.device.main_mode == 1
|
244
|
+
|
245
|
+
# test refresh works
|
246
|
+
await self.device.set_main_mode(2)
|
247
|
+
self.device.main_mode = None
|
248
|
+
await self.device.refresh()
|
249
|
+
assert self.device.main_mode == 2
|
250
|
+
|
251
|
+
async def test_heat_temp(self):
|
252
|
+
# test cache works
|
253
|
+
self.device.heat_temp = None
|
254
|
+
await self.device.set_heat_temp(1)
|
255
|
+
assert self.device.heat_temp == 1
|
256
|
+
|
257
|
+
# test refresh works
|
258
|
+
await self.device.set_heat_temp(2)
|
259
|
+
self.device.heat_temp = None
|
260
|
+
await self.device.refresh()
|
261
|
+
assert self.device.heat_temp == 2
|
262
|
+
|
263
|
+
async def test_heat_sub_mode(self):
|
264
|
+
# test cache works
|
265
|
+
self.device.heat_sub_mode = None
|
266
|
+
await self.device.set_heat_sub_mode(1)
|
267
|
+
assert self.device.heat_sub_mode == 1
|
268
|
+
|
269
|
+
# test refresh works
|
270
|
+
await self.device.set_heat_sub_mode(2)
|
271
|
+
self.device.heat_sub_mode = None
|
272
|
+
await self.device.refresh()
|
273
|
+
assert self.device.heat_sub_mode == 2
|
274
|
+
|
275
|
+
async def test_heat_fan_speed(self):
|
276
|
+
# test cache works
|
277
|
+
self.device.heat_fan_speed = None
|
278
|
+
await self.device.set_heat_fan_speed(1)
|
279
|
+
assert self.device.heat_fan_speed == 1
|
280
|
+
|
281
|
+
# test refresh works
|
282
|
+
await self.device.set_heat_fan_speed(2)
|
283
|
+
self.device.heat_fan_speed = None
|
284
|
+
await self.device.refresh()
|
285
|
+
assert self.device.heat_fan_speed == 2
|
286
|
+
|
287
|
+
async def test_cool_sub_mode(self):
|
288
|
+
# test cache works
|
289
|
+
self.device.cool_sub_mode = None
|
290
|
+
await self.device.set_cool_sub_mode(1)
|
291
|
+
assert self.device.cool_sub_mode == 1
|
292
|
+
|
293
|
+
# test refresh works
|
294
|
+
await self.device.set_cool_sub_mode(2)
|
295
|
+
self.device.cool_sub_mode = None
|
296
|
+
await self.device.refresh()
|
297
|
+
assert self.device.cool_sub_mode == 2
|
298
|
+
|
299
|
+
async def test_cool_fan_speed(self):
|
300
|
+
# test cache works
|
301
|
+
self.device.cool_fan_speed = None
|
302
|
+
await self.device.set_cool_fan_speed(1)
|
303
|
+
assert self.device.cool_fan_speed == 1
|
304
|
+
|
305
|
+
# test refresh works
|
306
|
+
await self.device.set_cool_fan_speed(2)
|
307
|
+
self.device.cool_fan_speed = None
|
308
|
+
await self.device.refresh()
|
309
|
+
assert self.device.cool_fan_speed == 2
|
310
|
+
|
311
|
+
async def test_ap_sub_mode(self):
|
312
|
+
# test cache works
|
313
|
+
self.device.ap_sub_mode = None
|
314
|
+
await self.device.set_ap_sub_mode(1)
|
315
|
+
assert self.device.ap_sub_mode == 1
|
316
|
+
|
317
|
+
# test refresh works
|
318
|
+
await self.device.set_ap_sub_mode(2)
|
319
|
+
self.device.ap_sub_mode = None
|
320
|
+
await self.device.refresh()
|
321
|
+
assert self.device.ap_sub_mode == 2
|
322
|
+
|
323
|
+
async def test_fan_speed_0(self):
|
324
|
+
# test cache works
|
325
|
+
self.device.fan_speed_0 = None
|
326
|
+
await self.device.set_fan_speed_0(1)
|
327
|
+
assert self.device.fan_speed_0 == 1
|
328
|
+
|
329
|
+
# test refresh works
|
330
|
+
await self.device.set_fan_speed_0(2)
|
331
|
+
self.device.fan_speed_0 = None
|
332
|
+
await self.device.refresh()
|
333
|
+
assert self.device.fan_speed_0 == 2
|
334
|
+
|
231
335
|
|
232
336
|
class EmptyDeviceAwsTest(DeviceAwsTestBase):
|
233
337
|
"""Tests for a emptydevice.
|
@@ -272,6 +376,15 @@ class EmptyDeviceAwsTest(DeviceAwsTestBase):
|
|
272
376
|
assert device.auto_regulated_humidity is NotImplemented
|
273
377
|
assert device.water_shortage is NotImplemented
|
274
378
|
assert device.wick_dry_mode is NotImplemented
|
379
|
+
assert device.main_mode is NotImplemented
|
380
|
+
assert device.ap_sub_mode is NotImplemented
|
381
|
+
assert device.heat_temp is NotImplemented
|
382
|
+
assert device.heat_sub_mode is NotImplemented
|
383
|
+
assert device.heat_fan_speed is NotImplemented
|
384
|
+
assert device.cool_sub_mode is NotImplemented
|
385
|
+
assert device.cool_fan_speed is NotImplemented
|
386
|
+
assert device.fan_speed_0 is NotImplemented
|
387
|
+
assert device.temperature_unit is NotImplemented
|
275
388
|
|
276
389
|
|
277
390
|
class H35iTest(DeviceAwsTestBase):
|
@@ -317,7 +430,15 @@ class H35iTest(DeviceAwsTestBase):
|
|
317
430
|
assert device.auto_regulated_humidity == 50
|
318
431
|
assert device.water_shortage is False
|
319
432
|
assert device.wick_dry_mode is False
|
320
|
-
|
433
|
+
assert device.main_mode is NotImplemented
|
434
|
+
assert device.ap_sub_mode is NotImplemented
|
435
|
+
assert device.heat_temp is NotImplemented
|
436
|
+
assert device.heat_sub_mode is NotImplemented
|
437
|
+
assert device.heat_fan_speed is NotImplemented
|
438
|
+
assert device.cool_sub_mode is NotImplemented
|
439
|
+
assert device.cool_fan_speed is NotImplemented
|
440
|
+
assert device.fan_speed_0 is NotImplemented
|
441
|
+
assert device.temperature_unit is NotImplemented
|
321
442
|
|
322
443
|
class T10iTest(DeviceAwsTestBase):
|
323
444
|
"""Tests for T10i."""
|
@@ -362,6 +483,15 @@ class T10iTest(DeviceAwsTestBase):
|
|
362
483
|
assert device.auto_regulated_humidity is NotImplemented
|
363
484
|
assert device.water_shortage is NotImplemented
|
364
485
|
assert device.wick_dry_mode is NotImplemented
|
486
|
+
assert device.main_mode == 1
|
487
|
+
assert device.heat_temp == 230
|
488
|
+
assert device.heat_sub_mode == 2
|
489
|
+
assert device.heat_fan_speed == 11
|
490
|
+
assert device.cool_sub_mode == 1
|
491
|
+
assert device.cool_fan_speed == 11
|
492
|
+
assert device.ap_sub_mode == 1
|
493
|
+
assert device.fan_speed_0 == 11
|
494
|
+
assert device.temperature_unit == 1
|
365
495
|
|
366
496
|
|
367
497
|
class Protect7470iTest(DeviceAwsTestBase):
|
@@ -407,3 +537,12 @@ class Protect7470iTest(DeviceAwsTestBase):
|
|
407
537
|
assert device.auto_regulated_humidity is NotImplemented
|
408
538
|
assert device.water_shortage is NotImplemented
|
409
539
|
assert device.wick_dry_mode is NotImplemented
|
540
|
+
assert device.main_mode is NotImplemented
|
541
|
+
assert device.heat_temp is NotImplemented
|
542
|
+
assert device.heat_sub_mode is NotImplemented
|
543
|
+
assert device.heat_fan_speed is NotImplemented
|
544
|
+
assert device.cool_sub_mode is NotImplemented
|
545
|
+
assert device.cool_fan_speed is NotImplemented
|
546
|
+
assert device.ap_sub_mode is NotImplemented
|
547
|
+
assert device.fan_speed_0 is NotImplemented
|
548
|
+
assert device.temperature_unit is NotImplemented
|
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
|
{blueair_api-1.31.3 → blueair_api-1.33.0}/src/blueair_api/intermediate_representation_aws.py
RENAMED
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
|