diff --git a/scripts/extract_gateway3_homekey.py b/scripts/extract_gateway3_homekey.py index 049586d..b52b1e3 100644 --- a/scripts/extract_gateway3_homekey.py +++ b/scripts/extract_gateway3_homekey.py @@ -17,6 +17,7 @@ def create_request(sid: int, cid: int, sequence_id: int, data: bytes) -> bytes: def decode_response(packet: bytes) -> dict[str, Any]: + """Decode a response frame from the PowerView protocol.""" if len(packet) < 4: raise ValueError("Packet size too small") sid, cid, sequence_id, length = struct.unpack(" bytes: def main(hub: str) -> None: - """Main function, extract homekeys from all shades.""" + """Extract the homekeys from all shades.""" try: shades_resp: requests.Response = requests.get( hub + "/home/shades", timeout=TIMEOUT