Skip to content

Commit 0364a36

Browse files
committed
Revert port-related deletion/change
1 parent 0fad395 commit 0364a36

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugwise_usb/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,15 @@ async def connect(self, port: str | None = None) -> None:
277277
"Close existing connection before (re)connect."
278278
)
279279

280+
if port is not None:
281+
self._port = port
282+
280283
if self._port is None:
281284
raise StickError(
282285
"Unable to connect. " +
283286
"Path to USB-Stick is not defined, set port property first"
284287
)
285288

286-
self._port = port
287289
await self._controller.connect_to_stick(
288290
self._port,
289291
)

0 commit comments

Comments
 (0)