Fix wrong values
This commit is contained in:
parent
83bb99a34e
commit
22276832cd
3 changed files with 7 additions and 3 deletions
|
@ -166,3 +166,7 @@ class HonDevice:
|
||||||
|
|
||||||
async def update(self):
|
async def update(self):
|
||||||
await self.load_attributes()
|
await self.load_attributes()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def data(self):
|
||||||
|
return self.attributes | self.parameters | self._appliance | self._statistics
|
||||||
|
|
|
@ -25,7 +25,7 @@ class HonParameterFixed(HonParameter):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self):
|
def value(self):
|
||||||
return self._value
|
return self._value if self._value is not None else "0"
|
||||||
|
|
||||||
@value.setter
|
@value.setter
|
||||||
def value(self, value):
|
def value(self, value):
|
||||||
|
@ -85,7 +85,7 @@ class HonParameterEnum(HonParameter):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self):
|
def value(self):
|
||||||
return self._value
|
return self._value if self._value is not None else self.values[0]
|
||||||
|
|
||||||
@value.setter
|
@value.setter
|
||||||
def value(self, value):
|
def value(self, value):
|
||||||
|
|
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.0.13",
|
version="0.0.14",
|
||||||
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