Skip to content

Commit f4f22af

Browse files
committed
Comment out unused client detail fetching logic
1 parent d5981a5 commit f4f22af

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

custom_components/unifi_network/coordinator.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -189,37 +189,38 @@ async def _fetch_and_merge(self) -> dict[str, UnifiClient]:
189189
)
190190

191191
# Prepare tasks to fetch details for each client concurrently
192-
tasks = [
193-
get_connected_client_details.asyncio(
194-
site_id=self.site_id,
195-
client_id=client_overview.id,
196-
client=self.client,
197-
)
198-
for client_overview in client_overviews
199-
]
192+
# tasks = [
193+
# get_connected_client_details.asyncio(
194+
# site_id=self.site_id,
195+
# client_id=client_overview.id,
196+
# client=self.client,
197+
# )
198+
# for client_overview in client_overviews
199+
# ]
200200

201-
results = await asyncio.gather(*tasks, return_exceptions=True)
201+
# results = await asyncio.gather(*tasks, return_exceptions=True)
202202

203203
# Create UnifiClient objects combining overview and details
204204
unifi_clients: dict[str, UnifiClient] = {}
205205
now = dt_util.now()
206206

207-
for client_overview, res in zip(client_overviews, results, strict=False):
207+
# for client_overview, res in zip(client_overviews, results, strict=False):
208+
for client_overview in client_overviews:
208209
if not hasattr(client_overview, "id") or client_overview.id is None:
209210
_LOGGER.warning("Client without id found, skipping")
210211
continue
211212

212213
client = UnifiClient(overview=client_overview, details=None)
213214
client_id = client.id # Always a string via the property
214215

215-
if isinstance(res, Exception):
216-
_LOGGER.debug(
217-
"Failed to fetch details for client %s: %s", client_id, res
218-
)
219-
client.details = None
220-
else:
221-
_LOGGER.debug("Fetched details for client %s", client_id)
222-
client.details = res
216+
# if isinstance(res, Exception):
217+
# _LOGGER.debug(
218+
# "Failed to fetch details for client %s: %s", client_id, res
219+
# )
220+
# client.details = None
221+
# else:
222+
# _LOGGER.debug("Fetched details for client %s", client_id)
223+
# client.details = res
223224

224225
client.last_seen = now
225226

0 commit comments

Comments
 (0)