File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,8 @@ def port(self, port: str) -> None:
176176 raise StickError (
177177 "Unable to change port while connected. Disconnect first"
178178 )
179- if self ._port is None :
180- self ._port = port
181- if port != self ._port :
182- self ._port = port
179+
180+ self ._port = port
183181
184182 @property
185183 def accept_join_request (self ) -> bool | None :
@@ -201,7 +199,7 @@ async def set_accept_join_request(self, state: bool) -> bool:
201199 if self ._network is None or not self ._network .is_running :
202200 raise StickError (
203201 "Cannot accept joining node"
204- + "without node discovery be activated. Call discover() first."
202+ + " without node discovery be activated. Call discover() first."
205203 )
206204
207205 # Observation: joining is only temporarily possible after a HA (re)start or
@@ -278,6 +276,7 @@ async def connect(self, port: str | None = None) -> None:
278276 f"Already connected to { self ._port } , " +
279277 "Close existing connection before (re)connect."
280278 )
279+
281280 if port is not None :
282281 self ._port = port
283282
@@ -286,6 +285,7 @@ async def connect(self, port: str | None = None) -> None:
286285 "Unable to connect. " +
287286 "Path to USB-Stick is not defined, set port property first"
288287 )
288+
289289 await self ._controller .connect_to_stick (
290290 self ._port ,
291291 )
You can’t perform that action at this time.
0 commit comments