blebox-uniapi 2.4.2__tar.gz → 2.5.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.
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/HISTORY.rst +4 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/PKG-INFO +5 -1
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/__init__.py +1 -1
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/feature.py +4 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/sensor.py +38 -7
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi.egg-info/PKG-INFO +5 -1
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/setup.cfg +1 -1
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/setup.py +1 -1
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/CONTRIBUTING.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/LICENSE +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/MANIFEST.in +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/README.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/binary_sensor.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/box.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/box_types.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/button.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/climate.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/cover.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/error.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/jfollow.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/light.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/session.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi/switch.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi.egg-info/SOURCES.txt +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi.egg-info/dependency_links.txt +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi.egg-info/not-zip-safe +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi.egg-info/requires.txt +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/blebox_uniapi.egg-info/top_level.txt +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/Makefile +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/authors.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/conf.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/contributing.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/history.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/index.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/installation.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/make.bat +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/readme.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/docs/usage.rst +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_box.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_box_types.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_button.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_climate.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_cover.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_light.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_light_unit.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_sensor.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_session.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_switch.py +0 -0
- {blebox_uniapi-2.4.2 → blebox_uniapi-2.5.0}/tests/test_unknown.py +0 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
=======
|
|
2
2
|
History
|
|
3
3
|
=======
|
|
4
|
+
2.5.0 (2024-08-20)
|
|
5
|
+
------------------
|
|
6
|
+
* feature: expose sensor_id in sensors and alias in all features by @swistakm in https://github.com/blebox/blebox_uniapi/pull/176
|
|
7
|
+
|
|
4
8
|
2.4.2 (2024-06-04)
|
|
5
9
|
------------------
|
|
6
10
|
* fix: add missing support for active power sensors on switchbox/switchboxd devices by @swistakm in https://github.com/blebox/blebox_uniapi/pull/175
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: blebox_uniapi
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
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
|
|
@@ -57,6 +57,10 @@ Credits
|
|
|
57
57
|
=======
|
|
58
58
|
History
|
|
59
59
|
=======
|
|
60
|
+
2.5.0 (2024-08-20)
|
|
61
|
+
------------------
|
|
62
|
+
* feature: expose sensor_id in sensors and alias in all features by @swistakm in https://github.com/blebox/blebox_uniapi/pull/176
|
|
63
|
+
|
|
60
64
|
2.4.2 (2024-06-04)
|
|
61
65
|
------------------
|
|
62
66
|
* fix: add missing support for active power sensors on switchbox/switchboxd devices by @swistakm in https://github.com/blebox/blebox_uniapi/pull/175
|
|
@@ -73,7 +73,10 @@ class SensorFactory:
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
feature = constructor(
|
|
76
|
-
product=product,
|
|
76
|
+
product=product,
|
|
77
|
+
alias=alias,
|
|
78
|
+
methods=materialized_methods,
|
|
79
|
+
sensor_id=sensor_id,
|
|
77
80
|
)
|
|
78
81
|
object_list.append(feature)
|
|
79
82
|
|
|
@@ -98,11 +101,18 @@ class BaseSensor(Feature):
|
|
|
98
101
|
_device_class: str
|
|
99
102
|
_native_value: Union[float, int, str]
|
|
100
103
|
_sensor_type: Optional[str]
|
|
104
|
+
_sensor_id: Optional[int]
|
|
101
105
|
|
|
102
106
|
def __init__(
|
|
103
|
-
self,
|
|
107
|
+
self,
|
|
108
|
+
product: "Box",
|
|
109
|
+
alias: str,
|
|
110
|
+
methods: dict,
|
|
111
|
+
sensor_type: str = None,
|
|
112
|
+
sensor_id: Optional[int] = None,
|
|
104
113
|
):
|
|
105
114
|
self._sensor_type = sensor_type
|
|
115
|
+
self._sensor_id = sensor_id
|
|
106
116
|
super().__init__(product, alias, methods)
|
|
107
117
|
|
|
108
118
|
@property
|
|
@@ -117,6 +127,14 @@ class BaseSensor(Feature):
|
|
|
117
127
|
def native_value(self):
|
|
118
128
|
return self._native_value
|
|
119
129
|
|
|
130
|
+
@property
|
|
131
|
+
def sensor_id(self):
|
|
132
|
+
return self._sensor_id
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def probe_id(self):
|
|
136
|
+
return self.sensor_id
|
|
137
|
+
|
|
120
138
|
@classmethod
|
|
121
139
|
def many_from_config(cls, product, box_type_config, extended_state):
|
|
122
140
|
raise NotImplementedError("Please use SensorFactory")
|
|
@@ -143,6 +161,7 @@ class GenericSensor(BaseSensor):
|
|
|
143
161
|
product: "Box",
|
|
144
162
|
alias: str,
|
|
145
163
|
methods: dict,
|
|
164
|
+
sensor_id: Optional[int],
|
|
146
165
|
*,
|
|
147
166
|
# generalization params
|
|
148
167
|
sensor_type: str,
|
|
@@ -150,7 +169,7 @@ class GenericSensor(BaseSensor):
|
|
|
150
169
|
scale: float = 1,
|
|
151
170
|
precision: Optional[int] = None,
|
|
152
171
|
):
|
|
153
|
-
super().__init__(product, alias, methods)
|
|
172
|
+
super().__init__(product, alias, methods, sensor_id=sensor_id)
|
|
154
173
|
self._unit = unit
|
|
155
174
|
self._scale = scale
|
|
156
175
|
self._precision = precision
|
|
@@ -200,8 +219,14 @@ class PowerConsumption(GenericSensor):
|
|
|
200
219
|
class Temperature(BaseSensor):
|
|
201
220
|
_current: Union[float, int, None]
|
|
202
221
|
|
|
203
|
-
def __init__(
|
|
204
|
-
|
|
222
|
+
def __init__(
|
|
223
|
+
self,
|
|
224
|
+
product: "Box",
|
|
225
|
+
alias: str,
|
|
226
|
+
methods: dict,
|
|
227
|
+
sensor_id: Optional[int] = None,
|
|
228
|
+
):
|
|
229
|
+
super().__init__(product, alias, methods, sensor_id=sensor_id)
|
|
205
230
|
self._unit = "celsius"
|
|
206
231
|
self._device_class = "temperature"
|
|
207
232
|
|
|
@@ -227,8 +252,14 @@ class Temperature(BaseSensor):
|
|
|
227
252
|
class AirQuality(BaseSensor):
|
|
228
253
|
_pm: Optional[int]
|
|
229
254
|
|
|
230
|
-
def __init__(
|
|
231
|
-
|
|
255
|
+
def __init__(
|
|
256
|
+
self,
|
|
257
|
+
product: "Box",
|
|
258
|
+
alias: str,
|
|
259
|
+
methods: dict,
|
|
260
|
+
sensor_id: Optional[str] = None,
|
|
261
|
+
):
|
|
262
|
+
super().__init__(product, alias, methods, sensor_id)
|
|
232
263
|
self._unit = "concentration_of_mp"
|
|
233
264
|
self._device_class = alias
|
|
234
265
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: blebox_uniapi
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
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
|
|
@@ -57,6 +57,10 @@ Credits
|
|
|
57
57
|
=======
|
|
58
58
|
History
|
|
59
59
|
=======
|
|
60
|
+
2.5.0 (2024-08-20)
|
|
61
|
+
------------------
|
|
62
|
+
* feature: expose sensor_id in sensors and alias in all features by @swistakm in https://github.com/blebox/blebox_uniapi/pull/176
|
|
63
|
+
|
|
60
64
|
2.4.2 (2024-06-04)
|
|
61
65
|
------------------
|
|
62
66
|
* fix: add missing support for active power sensors on switchbox/switchboxd devices by @swistakm in https://github.com/blebox/blebox_uniapi/pull/175
|
|
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
|