lifx-async 4.3.7__py3-none-any.whl → 4.3.9__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.
- lifx/devices/base.py +0 -2
- lifx/network/connection.py +9 -8
- {lifx_async-4.3.7.dist-info → lifx_async-4.3.9.dist-info}/METADATA +1 -1
- {lifx_async-4.3.7.dist-info → lifx_async-4.3.9.dist-info}/RECORD +6 -6
- {lifx_async-4.3.7.dist-info → lifx_async-4.3.9.dist-info}/WHEEL +1 -1
- {lifx_async-4.3.7.dist-info → lifx_async-4.3.9.dist-info}/licenses/LICENSE +0 -0
lifx/devices/base.py
CHANGED
|
@@ -166,8 +166,6 @@ class Device:
|
|
|
166
166
|
raise LifxUnsupportedCommandError(
|
|
167
167
|
f"Device does not support packet type {response.unhandled_type}"
|
|
168
168
|
)
|
|
169
|
-
if response is False:
|
|
170
|
-
raise LifxUnsupportedCommandError("Device does not support this command")
|
|
171
169
|
|
|
172
170
|
def __init__(
|
|
173
171
|
self,
|
lifx/network/connection.py
CHANGED
|
@@ -22,6 +22,7 @@ from lifx.exceptions import (
|
|
|
22
22
|
LifxConnectionError,
|
|
23
23
|
LifxProtocolError,
|
|
24
24
|
LifxTimeoutError,
|
|
25
|
+
LifxUnsupportedCommandError,
|
|
25
26
|
)
|
|
26
27
|
from lifx.network.message import create_message, parse_message
|
|
27
28
|
from lifx.network.transport import UdpTransport
|
|
@@ -722,8 +723,9 @@ class DeviceConnection:
|
|
|
722
723
|
|
|
723
724
|
# Check for StateUnhandled - return False to indicate unsupported
|
|
724
725
|
if header.pkt_type == _STATE_UNHANDLED_PKT_TYPE:
|
|
725
|
-
|
|
726
|
-
|
|
726
|
+
raise LifxUnsupportedCommandError(
|
|
727
|
+
"Device does not support this command"
|
|
728
|
+
)
|
|
727
729
|
|
|
728
730
|
# ACK received successfully
|
|
729
731
|
yield True
|
|
@@ -758,7 +760,7 @@ class DeviceConnection:
|
|
|
758
760
|
async def request_stream(
|
|
759
761
|
self,
|
|
760
762
|
packet: Any,
|
|
761
|
-
timeout: float =
|
|
763
|
+
timeout: float | None = None,
|
|
762
764
|
) -> AsyncGenerator[Any, None]:
|
|
763
765
|
"""Send request and yield unpacked responses.
|
|
764
766
|
|
|
@@ -821,6 +823,9 @@ class DeviceConnection:
|
|
|
821
823
|
# Ensure connection is open (lazy opening)
|
|
822
824
|
await self._ensure_open()
|
|
823
825
|
|
|
826
|
+
if timeout is None:
|
|
827
|
+
timeout = self.timeout
|
|
828
|
+
|
|
824
829
|
# Get packet metadata
|
|
825
830
|
packet_kind = getattr(packet, "_packet_kind", "OTHER")
|
|
826
831
|
|
|
@@ -940,11 +945,7 @@ class DeviceConnection:
|
|
|
940
945
|
f"Packet missing PKT_TYPE: {type(packet).__name__}"
|
|
941
946
|
)
|
|
942
947
|
|
|
943
|
-
async def request(
|
|
944
|
-
self,
|
|
945
|
-
packet: Any,
|
|
946
|
-
timeout: float = DEFAULT_REQUEST_TIMEOUT,
|
|
947
|
-
) -> Any:
|
|
948
|
+
async def request(self, packet: Any, timeout: float | None = None) -> Any:
|
|
948
949
|
"""Send request and get single response (convenience wrapper).
|
|
949
950
|
|
|
950
951
|
This is a convenience method that returns the first response from
|
|
@@ -5,7 +5,7 @@ lifx/const.py,sha256=dW64lf_jwAD40GSd6hkFkrni5j-w2qkV3pl6YNdCxv4,3426
|
|
|
5
5
|
lifx/exceptions.py,sha256=pikAMppLn7gXyjiQVWM_tSvXKNh-g366nG_UWyqpHhc,815
|
|
6
6
|
lifx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
lifx/devices/__init__.py,sha256=V7hW8sM_RwFgbR4Hv1ByR1JLhYq7Ft1X9pylQjCXYB8,777
|
|
8
|
-
lifx/devices/base.py,sha256=
|
|
8
|
+
lifx/devices/base.py,sha256=dVTjzIz_h5dd2tTJkWUTpu5HmQ-H1R2hcTqqzw5_84c,43790
|
|
9
9
|
lifx/devices/hev.py,sha256=ow4AU3eOVAcMK2KKAyQUTB7z6EDoRz7StwVOvwwS4Sk,10124
|
|
10
10
|
lifx/devices/infrared.py,sha256=q8q_cpjdRwojk76jBEdBeIYmqAA4FuTy7ZUquy2yEdg,4498
|
|
11
11
|
lifx/devices/light.py,sha256=EvUeCtjMS23PUoj3cOshFJ8SYT517ksH_3p27J3Sr2o,28452
|
|
@@ -20,7 +20,7 @@ lifx/effects/models.py,sha256=MS5D-cxD0Ar8XhqbqKAc9q2sk38IP1vPkYwd8V7jCr8,2446
|
|
|
20
20
|
lifx/effects/pulse.py,sha256=t5eyjfFWG1xT-RXKghRqHYJ9CG_50tPu4jsDapJZ2mw,8721
|
|
21
21
|
lifx/effects/state_manager.py,sha256=iDfYowiCN5IJqcR1s-pM0mQEJpe-RDsMcOOSMmtPVDE,8983
|
|
22
22
|
lifx/network/__init__.py,sha256=uSyA8r8qISG7qXUHbX8uk9A2E8rvDADgCcf94QIZ9so,499
|
|
23
|
-
lifx/network/connection.py,sha256=
|
|
23
|
+
lifx/network/connection.py,sha256=aerPiYWf096lq8oBiS7JfE4k-P18GS50mNEC4TYa2g8,38401
|
|
24
24
|
lifx/network/discovery.py,sha256=FoFoZcw3dtJs1daESiZiNXytanKQsMTdF9PjOxEgHM0,23804
|
|
25
25
|
lifx/network/message.py,sha256=jCLC9v0tbBi54g5CaHLFM_nP1Izu8kJmo2tt23HHBbA,2600
|
|
26
26
|
lifx/network/transport.py,sha256=8QS0YV32rdP0EDiPEwuvZXbplRWL08pmjKybd87mkZ0,11070
|
|
@@ -40,7 +40,7 @@ lifx/theme/canvas.py,sha256=4h7lgN8iu_OdchObGDgbxTqQLCb-FRKC-M-YCWef_i4,8048
|
|
|
40
40
|
lifx/theme/generators.py,sha256=L0X6_iApLx6XDboGlYunaVsl6nvUCqMfn23VQmRkyCk,6125
|
|
41
41
|
lifx/theme/library.py,sha256=tKlKZNqJp8lRGDnilWyDm_Qr1vCRGGwuvWVS82anNpQ,21326
|
|
42
42
|
lifx/theme/theme.py,sha256=qMEx_8E41C0Cc6f083XHiAXEglTv4YlXW0UFsG1rQKg,5521
|
|
43
|
-
lifx_async-4.3.
|
|
44
|
-
lifx_async-4.3.
|
|
45
|
-
lifx_async-4.3.
|
|
46
|
-
lifx_async-4.3.
|
|
43
|
+
lifx_async-4.3.9.dist-info/METADATA,sha256=MvH3VOBWH7ExbvDEZFteiTYdgd8RozuQU_c2aBLMtiE,2609
|
|
44
|
+
lifx_async-4.3.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
45
|
+
lifx_async-4.3.9.dist-info/licenses/LICENSE,sha256=eBz48GRA3gSiWn3rYZAz2Ewp35snnhV9cSqkVBq7g3k,1832
|
|
46
|
+
lifx_async-4.3.9.dist-info/RECORD,,
|
|
File without changes
|