@@ -176,18 +176,6 @@ def port(self, port: str) -> None:
176176
177177 self ._port = port
178178
179- `@raise_not_connected`
180- `@raise_not_initialized`
181- async def plus_pair_request (self , mac : str ) -> bool :
182- """Send a pair request to a Plus device."""
183- if self ._network is None :
184- raise StickError ("Cannot pair when network is not initialized" )
185- try :
186- await self ._network .pair_plus_device (mac )
187- except NodeError as exc :
188- raise NodeError (f"{ exc } " ) from exc
189- return True
190-
191179 async def set_energy_intervals (
192180 self , mac : str , cons_interval : int , prod_interval : int
193181 ) -> bool :
@@ -290,6 +278,18 @@ async def initialize(self, create_root_cache_folder: bool = False) -> None:
290278 if self ._cache_enabled :
291279 await self ._network .initialize_cache ()
292280
281+ @raise_not_connected
282+ @raise_not_initialized
283+ async def plus_pair_request (self , mac : str ) -> bool :
284+ """Send a pair request to a Plus device."""
285+ if self ._network is None :
286+ raise StickError ("Cannot pair when network is not initialized" )
287+ try :
288+ await self ._network .pair_plus_device (mac )
289+ except NodeError as exc :
290+ raise NodeError (f"{ exc } " ) from exc
291+ return True
292+
293293 @raise_not_connected
294294 @raise_not_initialized
295295 async def start_network (self ) -> None :
0 commit comments