blebox-uniapi 2.4.0__tar.gz → 2.4.1__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.
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/HISTORY.rst +4 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/PKG-INFO +5 -1
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/__init__.py +1 -1
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/box_types.py +7 -7
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/sensor.py +3 -12
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi.egg-info/PKG-INFO +5 -1
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/setup.cfg +1 -1
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/setup.py +1 -1
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/CONTRIBUTING.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/LICENSE +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/MANIFEST.in +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/README.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/binary_sensor.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/box.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/button.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/climate.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/cover.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/error.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/feature.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/jfollow.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/light.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/session.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi/switch.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi.egg-info/SOURCES.txt +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi.egg-info/dependency_links.txt +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi.egg-info/not-zip-safe +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi.egg-info/requires.txt +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/blebox_uniapi.egg-info/top_level.txt +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/Makefile +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/authors.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/conf.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/contributing.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/history.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/index.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/installation.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/make.bat +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/readme.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/docs/usage.rst +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_box.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_box_types.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_button.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_climate.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_cover.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_light.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_light_unit.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_sensor.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_session.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_switch.py +0 -0
- {blebox_uniapi-2.4.0 → blebox_uniapi-2.4.1}/tests/test_unknown.py +0 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
=======
|
|
2
2
|
History
|
|
3
3
|
=======
|
|
4
|
+
2.4.1 (2024-06-04)
|
|
5
|
+
------------------
|
|
6
|
+
* fix: rectify ambiguity around powerConsumption and wind sensor types
|
|
7
|
+
|
|
4
8
|
2.4.0 (2024-06-03)
|
|
5
9
|
------------------
|
|
6
10
|
* Fix: Refactor sensor_factory by @Pastucha in https://github.com/blebox/blebox_uniapi/pull/163
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: blebox_uniapi
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Summary: Python API for accessing BleBox smart home devices
|
|
5
5
|
Home-page: https://github.com/blebox/blebox_uniapi
|
|
6
6
|
Author: BleBox
|
|
@@ -69,6 +69,10 @@ Credits
|
|
|
69
69
|
=======
|
|
70
70
|
History
|
|
71
71
|
=======
|
|
72
|
+
2.4.1 (2024-06-04)
|
|
73
|
+
------------------
|
|
74
|
+
* fix: rectify ambiguity around powerConsumption and wind sensor types
|
|
75
|
+
|
|
72
76
|
2.4.0 (2024-06-03)
|
|
73
77
|
------------------
|
|
74
78
|
* Fix: Refactor sensor_factory by @Pastucha in https://github.com/blebox/blebox_uniapi/pull/163
|
|
@@ -280,7 +280,7 @@ BOX_TYPE_CONF: dict[str, dict[int, dict[str, Any]]] = {
|
|
|
280
280
|
[
|
|
281
281
|
"switchBox.energy",
|
|
282
282
|
{
|
|
283
|
-
"
|
|
283
|
+
"powerConsumption": lambda x: "powerMeasuring.powerConsumption[0]|value",
|
|
284
284
|
"periodS": "powerMeasuring.powerConsumption[0]|periodS",
|
|
285
285
|
"measurement_enabled": "powerMeasuring.enabled",
|
|
286
286
|
},
|
|
@@ -305,7 +305,7 @@ BOX_TYPE_CONF: dict[str, dict[int, dict[str, Any]]] = {
|
|
|
305
305
|
[
|
|
306
306
|
"switchBox.energy",
|
|
307
307
|
{
|
|
308
|
-
"
|
|
308
|
+
"powerConsumption": lambda x: "powerMeasuring.powerConsumption[0]|value",
|
|
309
309
|
"periodS": "powerMeasuring.powerConsumption[0]|periodS",
|
|
310
310
|
"measurement_enabled": "powerMeasuring.enabled",
|
|
311
311
|
},
|
|
@@ -330,7 +330,7 @@ BOX_TYPE_CONF: dict[str, dict[int, dict[str, Any]]] = {
|
|
|
330
330
|
[
|
|
331
331
|
"switchBox.energy",
|
|
332
332
|
{
|
|
333
|
-
"
|
|
333
|
+
"powerConsumption": lambda x: "powerMeasuring.powerConsumption[0]|value",
|
|
334
334
|
"periodS": "powerMeasuring.powerConsumption[0]|periodS",
|
|
335
335
|
"measurement_enabled": "powerMeasuring.enabled",
|
|
336
336
|
},
|
|
@@ -357,7 +357,7 @@ BOX_TYPE_CONF: dict[str, dict[int, dict[str, Any]]] = {
|
|
|
357
357
|
[
|
|
358
358
|
"switchBox.energy",
|
|
359
359
|
{
|
|
360
|
-
"
|
|
360
|
+
"powerConsumption": lambda x: "powerMeasuring.powerConsumption[0]|value ",
|
|
361
361
|
"periodS": "powerMeasuring.powerConsumption[0]|periodS",
|
|
362
362
|
"measurement_enabled": "powerMeasuring.enabled",
|
|
363
363
|
},
|
|
@@ -392,7 +392,7 @@ BOX_TYPE_CONF: dict[str, dict[int, dict[str, Any]]] = {
|
|
|
392
392
|
[
|
|
393
393
|
"switchBox.energy",
|
|
394
394
|
{
|
|
395
|
-
"
|
|
395
|
+
"powerConsumption": lambda x: "powerMeasuring.powerConsumption[0]|value ",
|
|
396
396
|
"periodS": "powerMeasuring.powerConsumption[0]|periodS",
|
|
397
397
|
"measurement_enabled": "powerMeasuring.enabled",
|
|
398
398
|
},
|
|
@@ -424,7 +424,7 @@ BOX_TYPE_CONF: dict[str, dict[int, dict[str, Any]]] = {
|
|
|
424
424
|
[
|
|
425
425
|
"switchBox.energy",
|
|
426
426
|
{
|
|
427
|
-
"
|
|
427
|
+
"powerConsumption": lambda x: "powerMeasuring.powerConsumption[0]|value ",
|
|
428
428
|
"periodS": "powerMeasuring.powerConsumption[0]|periodS",
|
|
429
429
|
"measurement_enabled": "powerMeasuring.enabled",
|
|
430
430
|
},
|
|
@@ -456,7 +456,7 @@ BOX_TYPE_CONF: dict[str, dict[int, dict[str, Any]]] = {
|
|
|
456
456
|
[
|
|
457
457
|
"switchBox.energy",
|
|
458
458
|
{
|
|
459
|
-
"
|
|
459
|
+
"powerConsumption": lambda x: "powerMeasuring.powerConsumption[0]|value ",
|
|
460
460
|
"periodS": "powerMeasuring.powerConsumption[0]|periodS",
|
|
461
461
|
"measurement_enabled": "powerMeasuring.enabled",
|
|
462
462
|
},
|
|
@@ -42,7 +42,7 @@ class SensorFactory:
|
|
|
42
42
|
power_states = extended_state["powerMeasuring"].get("powerConsumption", [])
|
|
43
43
|
# note: be careful of names as this has been historically named differently
|
|
44
44
|
# in home-assistant
|
|
45
|
-
states.extend({"type": "
|
|
45
|
+
states.extend({"type": "powerConsumption", **s} for s in power_states)
|
|
46
46
|
return states
|
|
47
47
|
|
|
48
48
|
@classmethod
|
|
@@ -133,6 +133,7 @@ class BaseSensor(Feature):
|
|
|
133
133
|
@SensorFactory.register("forwardActiveEnergy", unit="kWh")
|
|
134
134
|
@SensorFactory.register("illuminance", unit="lx", scale=100)
|
|
135
135
|
@SensorFactory.register("humidity", unit="percentage", scale=100)
|
|
136
|
+
@SensorFactory.register("wind", unit="m/s", scale=10)
|
|
136
137
|
class GenericSensor(BaseSensor):
|
|
137
138
|
def __init__(
|
|
138
139
|
# base sensor params
|
|
@@ -173,17 +174,7 @@ class GenericSensor(BaseSensor):
|
|
|
173
174
|
self._native_value = native
|
|
174
175
|
|
|
175
176
|
|
|
176
|
-
@SensorFactory.register("
|
|
177
|
-
class Wind(GenericSensor):
|
|
178
|
-
@property
|
|
179
|
-
def device_class(self):
|
|
180
|
-
# compat/legacy: this sensor is advertised in homeassistant as wind speed
|
|
181
|
-
# despite different sensor-type naming. Keep it consistent until we rectiify
|
|
182
|
-
# this upstream
|
|
183
|
-
return "wind_speed"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
@SensorFactory.register("powerMeasurement", unit="kWh")
|
|
177
|
+
@SensorFactory.register("powerConsumption", unit="kWh")
|
|
187
178
|
class PowerConsumption(GenericSensor):
|
|
188
179
|
# note: almost the same as typical generic sensor but also provides extra property
|
|
189
180
|
# to read last reset value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: blebox_uniapi
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Summary: Python API for accessing BleBox smart home devices
|
|
5
5
|
Home-page: https://github.com/blebox/blebox_uniapi
|
|
6
6
|
Author: BleBox
|
|
@@ -69,6 +69,10 @@ Credits
|
|
|
69
69
|
=======
|
|
70
70
|
History
|
|
71
71
|
=======
|
|
72
|
+
2.4.1 (2024-06-04)
|
|
73
|
+
------------------
|
|
74
|
+
* fix: rectify ambiguity around powerConsumption and wind sensor types
|
|
75
|
+
|
|
72
76
|
2.4.0 (2024-06-03)
|
|
73
77
|
------------------
|
|
74
78
|
* Fix: Refactor sensor_factory by @Pastucha in https://github.com/blebox/blebox_uniapi/pull/163
|
|
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
|
|
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
|
|
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
|