@@ -393,6 +393,7 @@ async def refresh_ws_token(self) -> None:
393393 await self .websocket_manager .refresh_token (self .websocket_manager .challengehub )
394394
395395 async def get_websocket_params (self ) -> None :
396+ """Retrieves and constructs WebSocket connection parameters from the negotiation endpoint."""
396397 uri = parse .urlparse (self .ws_url )
397398 LOG .debug ("Getting websocket params" )
398399 LOG .debug (f"Getting uri { uri } " )
@@ -415,10 +416,11 @@ async def get_websocket_params(self) -> None:
415416 "available_transports" : transport_dict ,
416417 "full_ws_url" : self .full_ws_url ,
417418 }
418- LOG .debug ("Calling set_state websocket_params " )
419+ LOG .debug ("Calling set_state from get_websocket_params " )
419420 await set_state (self ._state_yaml , "websocket" , websocket_dict )
420421
421422 async def fb_install (self , fb_id : str ) -> None :
423+ """Registers a Firebase installation and stores the authentication token state."""
422424 LOG .debug ("Posting firebase install" )
423425 body = {
424426 "fid" : fb_id ,
@@ -441,7 +443,7 @@ async def fb_install(self, fb_id: str) -> None:
441443 raise RequestError (err ) from err
442444 LOG .debug (f"FB Install data: { resp } " )
443445 auth_token = resp .get ("authToken" , {})
444- LOG .debug ("Calling set_state fb_install" )
446+ LOG .debug ("Calling set_state from fb_install" )
445447 await set_state (
446448 self ._state_yaml ,
447449 "firebase" ,
@@ -493,6 +495,7 @@ async def android_register(self) -> None:
493495 )
494496
495497 async def get_location_ids (self ) -> tuple [int , str ]:
498+ """Gets location id from an API call"""
496499 url = f"{ API_AUTOMATION_ENDPOINT } /Locations"
497500 LOG .debug (f"LocationId URL is { url } " )
498501 req : list [dict [str , Any ]] = await self .async_request ("get" , url )
@@ -516,6 +519,7 @@ async def _set_device_attribute(
516519 key : DeviceAttribute ,
517520 value : Union [str , float , int , None ],
518521 ) -> None :
522+ """Sets device attributes"""
519523 url = self ._get_url (f"Devices/{ device .id } /Attributes" , device .location_id )
520524 LOG .debug (f"Device Attribute URL is { url } " )
521525 await self .async_request ("put" , url , json = {key .hilo_attribute : value })
@@ -611,7 +615,7 @@ async def get_gd_events(
611615 }
612616 }
613617 """
614-
618+ # ic-dev21 need to check but this is probably dead code
615619 url = self ._get_url ("Events" , location_id , True )
616620 if not event_id :
617621 url += "?active=true"
@@ -645,6 +649,7 @@ async def get_seasons(self, location_id: int) -> dict[str, Any]:
645649 return cast (dict [str , Any ], await self .async_request ("get" , url ))
646650
647651 async def get_gateway (self , location_id : int ) -> dict [str , Any ]:
652+ """Gets info about the Hilo hub (gateway)"""
648653 url = self ._get_url ("Gateways/Info" , location_id )
649654 LOG .debug (f"Gateway URL is { url } " )
650655 req = await self .async_request ("get" , url )
0 commit comments