From 9594b9ebd8c02d9010ba076820ba8fee6a1d610e Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Sun, 23 Apr 2023 19:28:56 +0200 Subject: [PATCH] Use firmware version optional --- pyhon/connection/api.py | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyhon/connection/api.py b/pyhon/connection/api.py index a28cce5..cededa4 100644 --- a/pyhon/connection/api.py +++ b/pyhon/connection/api.py @@ -75,13 +75,14 @@ class HonAPI: "code": appliance.info["code"], "applianceModelId": appliance.appliance_model_id, "macAddress": appliance.mac_address, - "fwVersion": appliance.info["fwVersion"], "os": const.OS, "appVersion": const.APP_VERSION, "series": appliance.info["series"], } if firmware_id := appliance.info.get("eepromId"): params["firmwareId"] = firmware_id + if firmware_version := appliance.info.get("fwVersion"): + params["fwVersion"] = firmware_version url: str = f"{const.API_URL}/commands/v1/retrieve" async with self._hon.get(url, params=params) as response: result: Dict = (await response.json()).get("payload", {}) diff --git a/setup.py b/setup.py index 488cfeb..71bca29 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open("README.md", "r") as f: setup( name="pyhOn", - version="0.8.4", + version="0.8.5", author="Andre Basche", description="Control hOn devices with python", long_description=long_description,