From dd1cc23a3a981f1e6b59d9ce53ff6d4f67407dca Mon Sep 17 00:00:00 2001 From: kesawi <14970452+kesawi@users.noreply.github.com> Date: Sun, 17 May 2026 22:33:57 +1000 Subject: [PATCH 1/2] fix: return bool from local _set_value to correctly signal set command success --- pyintesishome/intesishomelocal.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyintesishome/intesishomelocal.py b/pyintesishome/intesishomelocal.py index d712420..024e652 100644 --- a/pyintesishome/intesishomelocal.py +++ b/pyintesishome/intesishomelocal.py @@ -205,11 +205,12 @@ async def _request_value(self, name: str) -> dict: return response["dpval"]["value"] async def _set_value(self, device_id, uid, value): - return await self._request( + result = await self._request( LOCAL_CMD_SET_DP_VALUE, uid=uid, value=value, ) + return result is not None async def get_datapoints(self) -> dict: """Get all available datapoints.""" @@ -334,6 +335,7 @@ def get_horizontal_swing_list(self, device_id) -> list: INTESIS_MAP[uid]["values"][i] for i in self._datapoints[uid]["descr"]["states"] ] + def has_horizontal_swing(self, device_id) -> bool: """Entity supports horizontal swing.""" return self._has_datapoint("hvane") From d61f31a72c35a79112e5d1866bbcbbaf0b70d903 Mon Sep 17 00:00:00 2001 From: kesawi <14970452+kesawi@users.noreply.github.com> Date: Sun, 17 May 2026 22:49:44 +1000 Subject: [PATCH 2/2] fix: return empty dict instead of None on successful request with no data payload --- pyintesishome/intesishomelocal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyintesishome/intesishomelocal.py b/pyintesishome/intesishomelocal.py index 024e652..6fc1286 100644 --- a/pyintesishome/intesishomelocal.py +++ b/pyintesishome/intesishomelocal.py @@ -169,7 +169,7 @@ async def _request(self, command: str, **kwargs) -> dict: # If there's neither a "success" or "error" key, something is very # wonky, so log an error plus the entire response. if json_response.get("success", False): - return json_response.get("data") + return json_response.get("data") or {} if "error" in json_response: error = json_response["error"] if error.get("code") in [1, 5]: