2323 NodePingResponse ,
2424 PlugwiseResponse ,
2525 StickInitResponse ,
26+ StickInitShortResponse ,
2627)
2728from .manager import StickConnectionManager
2829from .queue import StickQueue
@@ -172,7 +173,9 @@ async def initialize_stick(self) -> None:
172173
173174 try :
174175 request = StickInitRequest (self .send )
175- init_response : StickInitResponse | None = await request .send ()
176+ init_response : (
177+ StickInitResponse | StickInitShortResponse | None
178+ ) = await request .send ()
176179 except StickError as err :
177180 raise StickError (
178181 "No response from USB-Stick to initialization request."
@@ -188,10 +191,11 @@ async def initialize_stick(self) -> None:
188191 self ._mac_stick = init_response .mac_decoded
189192 self .stick_name = f"Stick { self ._mac_stick [- 5 :]} "
190193 self ._network_online = init_response .network_online
194+ if self ._network_online :
195+ # Replace first 2 characters by 00 for mac of circle+ node
196+ self ._mac_nc = init_response .mac_network_controller
197+ self ._network_id = init_response .network_id
191198
192- # Replace first 2 characters by 00 for mac of circle+ node
193- self ._mac_nc = init_response .mac_network_controller
194- self ._network_id = init_response .network_id
195199 self ._is_initialized = True
196200
197201 # Add Stick NodeInfoRequest
@@ -201,9 +205,6 @@ async def initialize_stick(self) -> None:
201205 hardware , _ = version_to_model (node_info .hardware )
202206 self ._hw_stick = hardware
203207
204- if not self ._network_online :
205- raise StickError ("Zigbee network connection to Circle+ is down." )
206-
207208 async def pair_plus_device (self , mac : str ) -> bool :
208209 """Pair Plus-device to Plugwise Stick.
209210
0 commit comments