From ea68a8700c1bac2cae627da76da5125b7237ef12 Mon Sep 17 00:00:00 2001 From: Stefan Koster Date: Tue, 7 Jan 2025 09:22:45 +0100 Subject: [PATCH 1/3] Added get_model function to return the device model if available --- pyintesishome/intesisbase.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyintesishome/intesisbase.py b/pyintesishome/intesisbase.py index 526d27b..f4c90d8 100644 --- a/pyintesishome/intesisbase.py +++ b/pyintesishome/intesisbase.py @@ -452,6 +452,12 @@ def get_horizontal_swing(self, device_id) -> str: """Public method returns the current horizontal vane setting.""" swing = self.get_device_property(device_id, "hvane") return swing + + def get_model(self, device_id) -> str: + """Public method returns the device model.""" + if "model" in self._devices[str(device_id)]: + return self._devices[str(device_id)]["model"] + return None def get_error(self, device_id) -> str: """Public method returns the current error code + description.""" From 7f394692b5fa1b50bf9d2b5a3b3471e58124f063 Mon Sep 17 00:00:00 2001 From: srkoster <89455157+srkoster@users.noreply.github.com> Date: Sun, 12 Jan 2025 14:30:16 +0100 Subject: [PATCH 2/3] Added get_fw_version method --- pyintesishome/intesisbase.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyintesishome/intesisbase.py b/pyintesishome/intesisbase.py index f4c90d8..9b8c560 100644 --- a/pyintesishome/intesisbase.py +++ b/pyintesishome/intesisbase.py @@ -459,6 +459,12 @@ def get_model(self, device_id) -> str: return self._devices[str(device_id)]["model"] return None + def get_fw_version(self, device_id) -> str: + """Public method returns the firmware version.""" + if "fw_version" in self._devices[str(device_id)]: + return self._devices[str(device_id)]["fw_version"] + return None + def get_error(self, device_id) -> str: """Public method returns the current error code + description.""" error_code = self.get_device_property(device_id, "error_code") From 0c470267498641f37c0daf8081d662c213968e8d Mon Sep 17 00:00:00 2001 From: srkoster <89455157+srkoster@users.noreply.github.com> Date: Sun, 12 Jan 2025 14:31:10 +0100 Subject: [PATCH 3/3] Pass the wlanFwVersion to fw_version --- pyintesishome/intesishomelocal.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyintesishome/intesishomelocal.py b/pyintesishome/intesishomelocal.py index 8c63067..6821544 100644 --- a/pyintesishome/intesishomelocal.py +++ b/pyintesishome/intesishomelocal.py @@ -272,6 +272,7 @@ async def poll_status(self, sendcallback=False): "name": info.get("ownSSID"), "widgets": [], "model": info.get("deviceModel"), + "fw_version": info.get("wlanFwVersion") } await self.get_datapoints()