fix: linting and formatting

This commit is contained in:
Richard Mann
2026-04-06 15:13:21 +10:00
parent af08d18d62
commit 652337e32c
6 changed files with 128 additions and 100 deletions

View File

@@ -61,7 +61,9 @@ def get_shade_key(hub: str, ble_name) -> bytes:
response: Final[bytes] = bytes.fromhex(responses[0]["hex"])
dec_resp: Final[dict[str, Any]] = decode_response(response)
if dec_resp["errorCode"] != 0:
raise ValueError(f"BLE errorCode={dec_resp['errorCode']} data={dec_resp['data'].hex()}")
raise ValueError(
f"BLE errorCode={dec_resp['errorCode']} data={dec_resp['data'].hex()}"
)
if len(dec_resp["data"]) != 16:
raise ValueError("Expected 16 byte homekey")
return dec_resp["data"]