From ff8ae160bba9108b9b0774c036bcc7a1a0ccc046 Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Fri, 6 Oct 2023 01:28:47 +0200 Subject: [PATCH] Fix empty prStr --- pyhon/commands.py | 2 ++ pyhon/const.py | 2 +- pyhon/parameter/fixed.py | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyhon/commands.py b/pyhon/commands.py index a305d78..68df63a 100644 --- a/pyhon/commands.py +++ b/pyhon/commands.py @@ -139,6 +139,8 @@ class HonCommand: async def send_parameters(self, params: Dict[str, str | float]) -> bool: ancillary_params = self.parameter_groups.get("ancillaryParameters", {}) ancillary_params.pop("programRules", None) + if "prStr" in params: + params["prStr"] = self._category_name.upper() self.appliance.sync_command_to_params(self.name) try: result = await self.api.send_command( diff --git a/pyhon/const.py b/pyhon/const.py index 4f97435..8d1fd26 100644 --- a/pyhon/const.py +++ b/pyhon/const.py @@ -6,7 +6,7 @@ CLIENT_ID = ( "3MVG9QDx8IX8nP5T2Ha8ofvlmjLZl5L_gvfbT9." "HJvpHGKoAS_dcMN8LYpTSYeVFCraUnV.2Ag1Ki7m4znVO6" ) -APP_VERSION = "2.1.2" +APP_VERSION = "2.3.5" OS_VERSION = 31 OS = "android" DEVICE_MODEL = "exynos9820" diff --git a/pyhon/parameter/fixed.py b/pyhon/parameter/fixed.py index 125ecd2..67a3056 100644 --- a/pyhon/parameter/fixed.py +++ b/pyhon/parameter/fixed.py @@ -18,7 +18,7 @@ class HonParameterFixed(HonParameter): @property 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 def value(self, value: str | float) -> None: diff --git a/setup.py b/setup.py index 1d057f1..e12972d 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open("README.md", "r", encoding="utf-8") as f: setup( name="pyhOn", - version="0.15.8", + version="0.15.9", author="Andre Basche", description="Control hOn devices with python", long_description=long_description,