velbus-aio 2024.11.1__py3-none-any.whl → 2024.12.1__py3-none-any.whl

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.

Potentially problematic release.


This version of velbus-aio might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: velbus-aio
3
- Version: 2024.11.1
3
+ Version: 2024.12.1
4
4
  Summary: Open-source home automation platform running on Python 3.
5
5
  Author-email: Maikel Punie <maikel.punie@gmail.com>
6
6
  License: MIT
@@ -2,7 +2,7 @@ velbusaio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  velbusaio/channels.py,sha256=38AgefFFXJpA9v4ZrRAvoHz3UKuGKEVUgbyYiY1mkho,23278
3
3
  velbusaio/command_registry.py,sha256=OuFnjU8Iy4HWW3016QwD_ai1x3btRUmCbVcJ260hNtA,5256
4
4
  velbusaio/const.py,sha256=aHClMaMS6NINTCrjeRwLbVzdvS91VgFKM8j61ks5tn0,1862
5
- velbusaio/controller.py,sha256=vKoDfEDlQF_L0ZrXU0L4yD61Adxr_qDma-e-dgWYz1w,7607
5
+ velbusaio/controller.py,sha256=jA5NJHqTeq6zFD8DwfRqX5DVtbU48OMVkbtSWEmtRFA,8957
6
6
  velbusaio/discovery.py,sha256=Px6qoZl4QhF17aMz6JxstCORBpLzZGWEK9h4Vyvg57o,1649
7
7
  velbusaio/exceptions.py,sha256=FHkXaM3dK5Gkk-QGAf9dLE3FPlCU2FRZWUyY-4KRNnA,515
8
8
  velbusaio/handler.py,sha256=gkRikfrTzekL0hFQSUV0AjVuMoUY1DNONEhbRBKyRko,11901
@@ -178,8 +178,8 @@ velbusaio/module_spec/5C.json,sha256=yw_XlccuFp-buRL_NXThwQLwblVRa0diLpUDm9Exrg0
178
178
  velbusaio/module_spec/5F.json,sha256=ebSwLMUW5A4LCRGOrF-vwxSVvrWZMNUWz10Xrmz7SwM,1259
179
179
  velbusaio/module_spec/60.json,sha256=Teih3jAybl5AELjY3gFbZrFN0RIMSU1yuvdsYZlMvTo,74
180
180
  velbusaio/module_spec/broadcast.json,sha256=L2Sc9FhZ7NOuu7K5g5jAhvUQGDP6a2CKrg-uWh_v-sA,2250
181
- velbus_aio-2024.11.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
182
- velbus_aio-2024.11.1.dist-info/METADATA,sha256=hDONnTT2bOEWFrsW-45dHpk7W5OZ2wES_wpG3NIhovk,4541
183
- velbus_aio-2024.11.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
184
- velbus_aio-2024.11.1.dist-info/top_level.txt,sha256=W0-lSOwD23mm8FqaIe9vY20fKicBMIdUVjF-zmfxRnY,15
185
- velbus_aio-2024.11.1.dist-info/RECORD,,
181
+ velbus_aio-2024.12.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
182
+ velbus_aio-2024.12.1.dist-info/METADATA,sha256=MTV34vlQruJz6VG-CDNB0PYuTHNznB0-RaFlZ6gX_Jo,4541
183
+ velbus_aio-2024.12.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
184
+ velbus_aio-2024.12.1.dist-info/top_level.txt,sha256=W0-lSOwD23mm8FqaIe9vY20fKicBMIdUVjF-zmfxRnY,15
185
+ velbus_aio-2024.12.1.dist-info/RECORD,,
velbusaio/controller.py CHANGED
@@ -13,7 +13,22 @@ from urllib.parse import urlparse
13
13
  import serial
14
14
  import serial_asyncio_fast
15
15
 
16
- from velbusaio.channels import Channel
16
+ from velbusaio.channels import (
17
+ Blind,
18
+ Button,
19
+ ButtonCounter,
20
+ Channel,
21
+ Dimmer,
22
+ EdgeLit,
23
+ LightSensor,
24
+ Memo,
25
+ Relay,
26
+ SelectedProgram,
27
+ Sensor,
28
+ SensorNumber,
29
+ Temperature,
30
+ ThermostatChannel,
31
+ )
17
32
  from velbusaio.exceptions import VelbusConnectionFailed
18
33
  from velbusaio.handler import PacketHandler
19
34
  from velbusaio.helpers import get_cache_dir
@@ -203,7 +218,52 @@ class Velbus:
203
218
  )
204
219
  )
205
220
 
206
- def get_all(self, class_name: str) -> list[Channel]:
221
+ def get_all_sensor(
222
+ self,
223
+ ) -> list[ButtonCounter | Temperature | LightSensor | SensorNumber]:
224
+ return self._get_all("sensor")
225
+
226
+ def get_all_switch(self) -> list[Relay]:
227
+ return self._get_all("switch")
228
+
229
+ def get_all_binary_sensor(self) -> list[Button]:
230
+ return self._get_all("binary_sensor")
231
+
232
+ def get_all_button(self) -> list[Button | ButtonCounter]:
233
+ return self._get_all("button")
234
+
235
+ def get_all_climate(self) -> list[Temperature]:
236
+ return self._get_all("climate")
237
+
238
+ def get_all_cover(self) -> list[Blind]:
239
+ return self._get_all("cover")
240
+
241
+ def get_all_select(self) -> list[SelectedProgram]:
242
+ return self._get_all("select")
243
+
244
+ def get_all_light(self) -> list[Dimmer]:
245
+ return self._get_all("light")
246
+
247
+ def get_all_led(self) -> list[Button]:
248
+ return self._get_all("led")
249
+
250
+ def _get_all(
251
+ self, class_name: str
252
+ ) -> list[
253
+ Blind
254
+ | Button
255
+ | ButtonCounter
256
+ | Sensor
257
+ | ThermostatChannel
258
+ | Dimmer
259
+ | Temperature
260
+ | SensorNumber
261
+ | LightSensor
262
+ | Relay
263
+ | EdgeLit
264
+ | Memo
265
+ | SelectedProgram
266
+ ]:
207
267
  """Get all channels."""
208
268
  lst = []
209
269
  for addr, mod in (self.get_modules()).items():