velbus-aio 2024.12.0__py3-none-any.whl → 2024.12.2__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.
- {velbus_aio-2024.12.0.dist-info → velbus_aio-2024.12.2.dist-info}/METADATA +1 -1
- {velbus_aio-2024.12.0.dist-info → velbus_aio-2024.12.2.dist-info}/RECORD +6 -6
- velbusaio/controller.py +36 -10
- {velbus_aio-2024.12.0.dist-info → velbus_aio-2024.12.2.dist-info}/LICENSE +0 -0
- {velbus_aio-2024.12.0.dist-info → velbus_aio-2024.12.2.dist-info}/WHEEL +0 -0
- {velbus_aio-2024.12.0.dist-info → velbus_aio-2024.12.2.dist-info}/top_level.txt +0 -0
|
@@ -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=
|
|
5
|
+
velbusaio/controller.py,sha256=Ohc-18ydnm76-5fOD_b24Aa_uYu6CdkI3ulfhska5og,8887
|
|
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.12.
|
|
182
|
-
velbus_aio-2024.12.
|
|
183
|
-
velbus_aio-2024.12.
|
|
184
|
-
velbus_aio-2024.12.
|
|
185
|
-
velbus_aio-2024.12.
|
|
181
|
+
velbus_aio-2024.12.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
182
|
+
velbus_aio-2024.12.2.dist-info/METADATA,sha256=3Bk4UzkeV9haPILcPdI81es2Fx4eeddUpmTFJ2HFczM,4541
|
|
183
|
+
velbus_aio-2024.12.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
184
|
+
velbus_aio-2024.12.2.dist-info/top_level.txt,sha256=W0-lSOwD23mm8FqaIe9vY20fKicBMIdUVjF-zmfxRnY,15
|
|
185
|
+
velbus_aio-2024.12.2.dist-info/RECORD,,
|
velbusaio/controller.py
CHANGED
|
@@ -142,10 +142,9 @@ class Velbus:
|
|
|
142
142
|
self._auto_reconnect = False
|
|
143
143
|
self._protocol.close()
|
|
144
144
|
|
|
145
|
-
async def connect(self
|
|
145
|
+
async def connect(self) -> None:
|
|
146
146
|
"""Connect to the bus and load all the data."""
|
|
147
147
|
await self._handler.read_protocol_data()
|
|
148
|
-
auth = None
|
|
149
148
|
# connect to the bus
|
|
150
149
|
if ":" in self._dsn:
|
|
151
150
|
# tcp/ip combination
|
|
@@ -157,8 +156,6 @@ class Velbus:
|
|
|
157
156
|
ctx = ssl._create_unverified_context()
|
|
158
157
|
else:
|
|
159
158
|
ctx = None
|
|
160
|
-
if parts.username:
|
|
161
|
-
auth = parts.username
|
|
162
159
|
try:
|
|
163
160
|
(
|
|
164
161
|
_transport,
|
|
@@ -190,12 +187,12 @@ class Velbus:
|
|
|
190
187
|
)
|
|
191
188
|
except (FileNotFoundError, serial.SerialException) as err:
|
|
192
189
|
raise VelbusConnectionFailed from err
|
|
193
|
-
if test_connect:
|
|
194
|
-
return
|
|
195
|
-
# if auth is required send the auth key
|
|
196
|
-
if auth:
|
|
197
|
-
await self._protocol.write_auth_key(auth)
|
|
198
190
|
|
|
191
|
+
async def start(self) -> None:
|
|
192
|
+
# if auth is required send the auth key
|
|
193
|
+
parts = urlparse(self._dsn)
|
|
194
|
+
if parts.username:
|
|
195
|
+
await self._protocol.write_auth_key(parts.username)
|
|
199
196
|
# scan the bus
|
|
200
197
|
await self._handler.scan()
|
|
201
198
|
|
|
@@ -218,7 +215,36 @@ class Velbus:
|
|
|
218
215
|
)
|
|
219
216
|
)
|
|
220
217
|
|
|
221
|
-
def
|
|
218
|
+
def get_all_sensor(
|
|
219
|
+
self,
|
|
220
|
+
) -> list[ButtonCounter | Temperature | LightSensor | SensorNumber]:
|
|
221
|
+
return self._get_all("sensor")
|
|
222
|
+
|
|
223
|
+
def get_all_switch(self) -> list[Relay]:
|
|
224
|
+
return self._get_all("switch")
|
|
225
|
+
|
|
226
|
+
def get_all_binary_sensor(self) -> list[Button]:
|
|
227
|
+
return self._get_all("binary_sensor")
|
|
228
|
+
|
|
229
|
+
def get_all_button(self) -> list[Button | ButtonCounter]:
|
|
230
|
+
return self._get_all("button")
|
|
231
|
+
|
|
232
|
+
def get_all_climate(self) -> list[Temperature]:
|
|
233
|
+
return self._get_all("climate")
|
|
234
|
+
|
|
235
|
+
def get_all_cover(self) -> list[Blind]:
|
|
236
|
+
return self._get_all("cover")
|
|
237
|
+
|
|
238
|
+
def get_all_select(self) -> list[SelectedProgram]:
|
|
239
|
+
return self._get_all("select")
|
|
240
|
+
|
|
241
|
+
def get_all_light(self) -> list[Dimmer]:
|
|
242
|
+
return self._get_all("light")
|
|
243
|
+
|
|
244
|
+
def get_all_led(self) -> list[Button]:
|
|
245
|
+
return self._get_all("led")
|
|
246
|
+
|
|
247
|
+
def _get_all(
|
|
222
248
|
self, class_name: str
|
|
223
249
|
) -> list[
|
|
224
250
|
Blind
|
|
File without changes
|
|
File without changes
|
|
File without changes
|