mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-12-22 18:55:32 +00:00
Handle appliances without attributes
This commit is contained in:
parent
ef4f7f7398
commit
96233dd7fd
|
@ -5,7 +5,8 @@ from pyhon.commands import HonCommand
|
||||||
|
|
||||||
class HonDevice:
|
class HonDevice:
|
||||||
def __init__(self, connector, appliance):
|
def __init__(self, connector, appliance):
|
||||||
appliance["attributes"] = {v["parName"]: v["parValue"] for v in appliance["attributes"]}
|
if attributes := appliance.get("attributes"):
|
||||||
|
appliance["attributes"] = {v["parName"]: v["parValue"] for v in attributes}
|
||||||
self._appliance = appliance
|
self._appliance = appliance
|
||||||
self._connector = connector
|
self._connector = connector
|
||||||
self._appliance_model = {}
|
self._appliance_model = {}
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ with open("README.md", "r") as f:
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pyhOn",
|
name="pyhOn",
|
||||||
version="0.3.4",
|
version="0.3.5",
|
||||||
author="Andre Basche",
|
author="Andre Basche",
|
||||||
description="Control hOn devices with python",
|
description="Control hOn devices with python",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
|
|
Loading…
Reference in a new issue