Skip to content

Commit

Permalink
Make 'code' attribute really optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed May 18, 2023
1 parent dfbc244 commit 9f130e2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyhon/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def diagnose(self, whitespace=" ", command_only=False):
extra = {n: c.data for n, c in self._commands.items() if c.data}
if extra:
data |= {"extra_command_data": extra}
for sensible in ["PK", "SK", "serialNumber", "code", "coords", "device"]:
for sensible in ["PK", "SK", "serialNumber", "coords", "device"]:
data.get("appliance", {}).pop(sensible, None)
result = helper.pretty_print({"data": data}, whitespace=whitespace)
result += helper.pretty_print(
Expand Down
1 change: 0 additions & 1 deletion pyhon/connection/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ async def load_appliances(self) -> Dict:
async def load_commands(self, appliance: HonAppliance) -> Dict:
params: Dict = {
"applianceType": appliance.appliance_type,
"code": appliance.info["code"],
"applianceModelId": appliance.appliance_model_id,
"macAddress": appliance.mac_address,
"os": const.OS,
Expand Down
2 changes: 1 addition & 1 deletion pyhon/hon.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def _create_appliance(self, appliance_data: Dict[str, Any], zone=0) -> Non
)
except (KeyError, ValueError, IndexError) as error:
_LOGGER.exception(error)
_LOGGER.error(f"Device data - %s", appliance_data)
_LOGGER.error("Device data - %s", appliance_data)
self._appliances.append(appliance)

async def setup(self) -> None:
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.10.8",
version="0.10.9",
author="Andre Basche",
description="Control hOn devices with python",
long_description=long_description,
Expand Down

0 comments on commit 9f130e2

Please sign in to comment.