Use firmware id optional
This commit is contained in:
parent
13cff8caa0
commit
ad864286fc
2 changed files with 3 additions and 2 deletions
|
@ -74,13 +74,14 @@ class HonAPI:
|
|||
"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", {})
|
||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ with open("README.md", "r") as f:
|
|||
|
||||
setup(
|
||||
name="pyhOn",
|
||||
version="0.8.2",
|
||||
version="0.8.3",
|
||||
author="Andre Basche",
|
||||
description="Control hOn devices with python",
|
||||
long_description=long_description,
|
||||
|
|
Loading…
Reference in a new issue