Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
aeabbe64e2 | |||
7c99ffeaf7 | |||
2941b57d09 | |||
f00ee03c0d | |||
ec7355e341 |
@ -55,6 +55,8 @@ class HonConnection:
|
|||||||
appliances = (await resp.json())["payload"]["appliances"]
|
appliances = (await resp.json())["payload"]["appliances"]
|
||||||
for appliance in appliances:
|
for appliance in appliances:
|
||||||
device = HonDevice(self, appliance)
|
device = HonDevice(self, appliance)
|
||||||
|
if device.mac_address is None:
|
||||||
|
continue
|
||||||
await asyncio.gather(*[
|
await asyncio.gather(*[
|
||||||
device.load_attributes(),
|
device.load_attributes(),
|
||||||
device.load_commands(),
|
device.load_commands(),
|
||||||
@ -70,7 +72,7 @@ class HonConnection:
|
|||||||
"applianceType": device.appliance_type,
|
"applianceType": device.appliance_type,
|
||||||
"code": device.appliance["code"],
|
"code": device.appliance["code"],
|
||||||
"applianceModelId": device.appliance_model_id,
|
"applianceModelId": device.appliance_model_id,
|
||||||
"firmwareId": "41",
|
"firmwareId": device.appliance["eepromId"],
|
||||||
"macAddress": device.mac_address,
|
"macAddress": device.mac_address,
|
||||||
"fwVersion": device.appliance["fwVersion"],
|
"fwVersion": device.appliance["fwVersion"],
|
||||||
"os": const.OS,
|
"os": const.OS,
|
||||||
|
@ -30,7 +30,7 @@ class HonParameter:
|
|||||||
class HonParameterFixed(HonParameter):
|
class HonParameterFixed(HonParameter):
|
||||||
def __init__(self, key, attributes):
|
def __init__(self, key, attributes):
|
||||||
super().__init__(key, attributes)
|
super().__init__(key, attributes)
|
||||||
self._value = attributes["fixedValue"]
|
self._value = attributes.get("fixedValue", None)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f"{self.__class__} (<{self.key}> fixed)"
|
return f"{self.__class__} (<{self.key}> fixed)"
|
||||||
|
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.5",
|
version="0.3.6",
|
||||||
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,
|
||||||
|
Reference in New Issue
Block a user