File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -316,6 +316,16 @@ async def load_nodes(self) -> bool:
316316 )
317317 return await self ._network .discover_nodes (load = True )
318318
319+ @raise_not_connected
320+ @raise_not_initialized
321+ async def discover_stick (self ) -> None :
322+ """Discover all nodes."""
323+ if self ._network is None :
324+ raise StickError (
325+ "Cannot load nodes when network is not initialized"
326+ )
327+ await self ._network .discover_stick ()
328+
319329 @raise_not_connected
320330 @raise_not_initialized
321331 async def discover_coordinator (self , load : bool = False ) -> None :
Original file line number Diff line number Diff line change @@ -286,19 +286,16 @@ def _unsubscribe_to_protocol_events(self) -> None:
286286
287287 # endregion
288288
289- async def discover_stick (self , load : bool = False ) -> bool :
289+ async def discover_stick (self ) -> bool :
290290 """Fetch data from the Stick."""
291291 if self ._controller .mac_stick is None :
292292 raise NodeError ("Unknown mac address for the Stick." )
293293
294- _LOGGER .debug ("Obtain Stick info" )
294+ _LOGGER .debug ("Obtaining Stick info" )
295295 node_info , _ = await self ._controller .get_node_details (self ._controller .mac_stick , ping_first = False )
296296 if node_info is not None :
297- _LOGGER .debug ("HOI fw_stick before: %s" , self ._controller ._fw_stick )
298297 self ._controller ._fw_stick = node_info .firmware
299298 self ._controller ._hw_stick = node_info .hardware
300- _LOGGER .debug ("HOI fw_stick: %s" , self ._controller ._fw_stick )
301- _LOGGER .debug ("HOI hw_stick: %s" , self ._controller ._hw_stick )
302299
303300 # region - Coordinator
304301 async def discover_network_coordinator (self , load : bool = False ) -> bool :
You can’t perform that action at this time.
0 commit comments