From f2ad61a0166885c1065bf856d898f2a76fb1ecff Mon Sep 17 00:00:00 2001 From: patman15 <14628713+patman15@users.noreply.github.com> Date: Thu, 2 Jan 2025 10:37:34 +0100 Subject: [PATCH] Update extract_gateway3_homekey.py --- scripts/extract_gateway3_homekey.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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