From 976c0b0b8e61cfff1f640cf7cafadb1d469e665b Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 3 Jul 2026 16:59:06 +0000 Subject: [PATCH 1/2] Remove deprecated endpoint request --- pyhilo/api.py | 32 -------------------------------- 1 file changed, 32 deletions(-) mode change 100755 => 100644 pyhilo/api.py diff --git a/pyhilo/api.py b/pyhilo/api.py old mode 100755 new mode 100644 index f3051e0..942b769 --- a/pyhilo/api.py +++ b/pyhilo/api.py @@ -715,38 +715,6 @@ async def get_seasons(self, location_id: int) -> list[dict[str, Any]]: return all_seasons - async def get_gateway(self, location_id: int) -> dict[str, Any]: - """Gets info about the Hilo hub (gateway)""" - url = self._get_url("Gateways/Info", location_id=location_id) - LOG.debug("Gateway URL is %s", url) - req = await self.async_request("get", url) - saved_attrs = [ - "zigBeePairingActivated", - "zigBeeChannel", - "firmwareVersion", - "onlineStatus", - "lastStatusTime", - "disconnected", - ] - - gw = { - "name": "Hilo Gateway", - "Disconnected": {"value": not req[0].get("onlineStatus") == "Online"}, - "type": "Gateway", - "category": "Gateway", - "supportedAttributes": ", ".join(saved_attrs), - "settableAttributes": "", - "id": 1, - "identifier": req[0].get("dsn"), - "sdi": req[0].get("sdi"), - "provider": 1, - "model_number": "EQ000017", - "sw_version": req[0].get("firmwareVersion"), - } - for attr in saved_attrs: - gw[attr] = {"value": req[0].get(attr)} - return gw - async def get_weather(self, location_id: int) -> dict[str, Any]: """This will return the current weather like in the app https://api.hiloenergie.com/Automation/v1/api/Locations/XXXX/Weather From 84493756d14fc437c968fbf8ce0ca86d424a643d Mon Sep 17 00:00:00 2001 From: Invvard <7305493+Invvard@users.noreply.github.com> Date: Fri, 3 Jul 2026 17:00:30 +0000 Subject: [PATCH 2/2] Remove deprecated endpoint request call --- pyhilo/devices.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pyhilo/devices.py b/pyhilo/devices.py index bfcfd4f..deef59e 100644 --- a/pyhilo/devices.py +++ b/pyhilo/devices.py @@ -99,7 +99,7 @@ def generate_device(self, device: dict) -> HiloDevice: return dev async def update(self) -> None: - """Update device list from SignalR cache + gateway from REST.""" + """Update device list from SignalR cache.""" # Get devices from SignalR cache (already populated by DeviceListInitialValuesReceived) cached_devices = self._api.get_device_cache(self.location_id) generated_devices = [] @@ -110,17 +110,6 @@ async def update(self) -> None: if dev not in self.devices: self.devices.append(dev) - # Append gateway from REST API (still available) - try: - gw = await self._api.get_gateway(self.location_id) - LOG.debug("Generating gateway device %s", gw) - gw_dev = self.generate_device(gw) - generated_devices.append(gw_dev) - if gw_dev not in self.devices: - self.devices.append(gw_dev) - except Exception as err: - LOG.error("Failed to get gateway: %s", err) - # Now add devices from external sources (e.g. unknown source tracker) for callback in self._api._get_device_callbacks: try: @@ -183,7 +172,6 @@ async def async_init(self) -> None: Gets location IDs from REST API, then waits for the SignalR hub to deliver the device list via DeviceListInitialValuesReceived. - The gateway is appended from REST. """ LOG.info("Initialising: getting location IDs") location_ids = await self._api.get_location_ids()