Fix empty prStr
This commit is contained in:
parent
658e80a8f4
commit
ff8ae160bb
@ -139,6 +139,8 @@ class HonCommand:
|
|||||||
async def send_parameters(self, params: Dict[str, str | float]) -> bool:
|
async def send_parameters(self, params: Dict[str, str | float]) -> bool:
|
||||||
ancillary_params = self.parameter_groups.get("ancillaryParameters", {})
|
ancillary_params = self.parameter_groups.get("ancillaryParameters", {})
|
||||||
ancillary_params.pop("programRules", None)
|
ancillary_params.pop("programRules", None)
|
||||||
|
if "prStr" in params:
|
||||||
|
params["prStr"] = self._category_name.upper()
|
||||||
self.appliance.sync_command_to_params(self.name)
|
self.appliance.sync_command_to_params(self.name)
|
||||||
try:
|
try:
|
||||||
result = await self.api.send_command(
|
result = await self.api.send_command(
|
||||||
|
@ -6,7 +6,7 @@ CLIENT_ID = (
|
|||||||
"3MVG9QDx8IX8nP5T2Ha8ofvlmjLZl5L_gvfbT9."
|
"3MVG9QDx8IX8nP5T2Ha8ofvlmjLZl5L_gvfbT9."
|
||||||
"HJvpHGKoAS_dcMN8LYpTSYeVFCraUnV.2Ag1Ki7m4znVO6"
|
"HJvpHGKoAS_dcMN8LYpTSYeVFCraUnV.2Ag1Ki7m4znVO6"
|
||||||
)
|
)
|
||||||
APP_VERSION = "2.1.2"
|
APP_VERSION = "2.3.5"
|
||||||
OS_VERSION = 31
|
OS_VERSION = 31
|
||||||
OS = "android"
|
OS = "android"
|
||||||
DEVICE_MODEL = "exynos9820"
|
DEVICE_MODEL = "exynos9820"
|
||||||
|
@ -18,7 +18,7 @@ class HonParameterFixed(HonParameter):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self) -> str | float:
|
def value(self) -> str | float:
|
||||||
return self._value if self._value is not None else "0"
|
return self._value if self._value != "" else "0"
|
||||||
|
|
||||||
@value.setter
|
@value.setter
|
||||||
def value(self, value: str | float) -> None:
|
def value(self, value: str | float) -> None:
|
||||||
|
2
setup.py
2
setup.py
@ -7,7 +7,7 @@ with open("README.md", "r", encoding="utf-8") as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pyhOn",
|
name="pyhOn",
|
||||||
version="0.15.8",
|
version="0.15.9",
|
||||||
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 New Issue
Block a user