PyVLCB 0.2.6__tar.gz → 0.2.7__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.
- {pyvlcb-0.2.6/src/PyVLCB.egg-info → pyvlcb-0.2.7}/PKG-INFO +1 -1
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/pyproject.toml +1 -1
- {pyvlcb-0.2.6 → pyvlcb-0.2.7/src/PyVLCB.egg-info}/PKG-INFO +1 -1
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/pyvlcb/__init__.py +9 -2
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/LICENSE +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/README.md +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/setup.cfg +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/PyVLCB.egg-info/SOURCES.txt +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/PyVLCB.egg-info/dependency_links.txt +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/PyVLCB.egg-info/requires.txt +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/PyVLCB.egg-info/top_level.txt +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/pyvlcb/canusb.py +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/pyvlcb/exceptions.py +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/pyvlcb/tests/run_tests.py +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/pyvlcb/tests/test_canusb4.py +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/pyvlcb/tests/test_vlcb.py +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/pyvlcb/utils.py +0 -0
- {pyvlcb-0.2.6 → pyvlcb-0.2.7}/src/pyvlcb/vlcbformat.py +0 -0
|
@@ -250,9 +250,16 @@ class VLCB:
|
|
|
250
250
|
Returns:
|
|
251
251
|
String: A string for the request
|
|
252
252
|
"""
|
|
253
|
+
|
|
253
254
|
# if ev_id is a string then convert to an int
|
|
254
255
|
# Setting based to 0 will automatically handle base 10 or hex
|
|
255
|
-
|
|
256
|
+
if not isinstance(ev_id, (int, str)):
|
|
257
|
+
raise TypeError(f"Expected int or str, got {type(ev_id).__name__}")
|
|
258
|
+
|
|
259
|
+
# Convert strings (ints are ignored and remain ints)
|
|
260
|
+
if isinstance(ev_id, str):
|
|
261
|
+
ev_id = int(ev_id, 0)
|
|
262
|
+
|
|
256
263
|
# determine if long or short
|
|
257
264
|
if ev_id <= 0xffff:
|
|
258
265
|
return self.accessory_short_command (node_id, ev_id, state)
|
|
@@ -491,4 +498,4 @@ class VLCB:
|
|
|
491
498
|
return f"{self.make_header(opcode='60')}60{num_to_1hexstr(session_id)}{byte1_2[0]}{byte1_2[1]};"
|
|
492
499
|
|
|
493
500
|
|
|
494
|
-
|
|
501
|
+
|
|
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
|