Skip to content

Commit 7b8a52b

Browse files
committed
Remove dead code
Avec le call retiré vers get_gateway et le build via GQL le code suivant est mort et peut être retiré
1 parent 5f052d7 commit 7b8a52b

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

pyhilo/api.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -715,38 +715,6 @@ async def get_seasons(self, location_id: int) -> list[dict[str, Any]]:
715715

716716
return all_seasons
717717

718-
async def get_gateway(self, location_id: int) -> dict[str, Any]:
719-
"""Gets info about the Hilo hub (gateway)"""
720-
url = self._get_url("Gateways/Info", location_id=location_id)
721-
LOG.debug("Gateway URL is %s", url)
722-
req = await self.async_request("get", url)
723-
LOG.debug("Gateway REST response: %s", json.dumps(req, indent=2))
724-
saved_attrs = [
725-
"zigBeePairingActivated",
726-
"zigBeeChannel",
727-
"firmwareVersion",
728-
"onlineStatus",
729-
"lastStatusTime",
730-
"disconnected",
731-
]
732-
733-
gw = {
734-
"name": "Hilo Gateway",
735-
"Disconnected": {"value": not req[0].get("onlineStatus") == "Online"},
736-
"type": "Gateway",
737-
"category": "Gateway",
738-
"supportedAttributes": ", ".join(saved_attrs),
739-
"settableAttributes": "",
740-
"id": 1,
741-
"identifier": req[0].get("dsn"),
742-
"sdi": req[0].get("sdi"),
743-
"provider": 1,
744-
"model_number": "EQ000017",
745-
"sw_version": req[0].get("firmwareVersion"),
746-
}
747-
for attr in saved_attrs:
748-
gw[attr] = {"value": req[0].get(attr)}
749-
return gw
750718

751719
async def get_weather(self, location_id: int) -> dict[str, Any]:
752720
"""This will return the current weather like in the app

0 commit comments

Comments
 (0)