Skip to content

Commit

Permalink
Use firmware id optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed Apr 23, 2023
1 parent 13cff8c commit ad86428
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyhon/connection/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ async def load_commands(self, appliance: HonAppliance) -> Dict:
"applianceType": appliance.appliance_type,
"code": appliance.info["code"],
"applianceModelId": appliance.appliance_model_id,
"firmwareId": appliance.info["eepromId"],
"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
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", {})
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="pyhOn",
version="0.8.2",
version="0.8.3",
author="Andre Basche",
description="Control hOn devices with python",
long_description=long_description,
Expand Down

0 comments on commit ad86428

Please sign in to comment.