File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,17 @@ def _unsubscribe_to_protocol_events(self) -> None:
286286
287287 # endregion
288288
289+ async def discover_stick (self , load : bool = False ) -> bool :
290+ """Fetch data from the Stick."""
291+ if self ._controller .mac_stick is None :
292+ raise NodeError ("Unknown mac address for the Stick." )
293+
294+ _LOGGER .debug ("Optain Stick info" )
295+ node_info , _ = await self ._controller .get_node_details (self ._controller .mac_stick , ping_first = False )
296+ if node_info is not None :
297+ self ._controller .fw_stick = node_info .firmware
298+ self ._controller .hw_stick = node_info .hardware
299+
289300 # region - Coordinator
290301 async def discover_network_coordinator (self , load : bool = False ) -> bool :
291302 """Discover the Zigbee network coordinator (Circle+/Stealth+)."""
@@ -482,6 +493,7 @@ async def start(self) -> None:
482493
483494 async def discover_nodes (self , load : bool = True ) -> bool :
484495 """Discover nodes."""
496+ await self .discover_stick (load = load )
485497 await self .discover_network_coordinator (load = load )
486498 if not self ._is_running :
487499 await self .start ()
You can’t perform that action at this time.
0 commit comments