diff --git a/homeassistant/components/microsoft_face/__init__.py b/homeassistant/components/microsoft_face/__init__.py index 6e47ad79f5b9e7..af0567f99a1e6c 100644 --- a/homeassistant/components/microsoft_face/__init__.py +++ b/homeassistant/components/microsoft_face/__init__.py @@ -2,8 +2,10 @@ from __future__ import annotations import asyncio +from collections.abc import Coroutine import json import logging +from typing import Any import aiohttp from aiohttp.hdrs import CONTENT_TYPE @@ -267,11 +269,11 @@ def store(self): """Store group/person data and IDs.""" return self._store - async def update_store(self): + async def update_store(self) -> None: """Load all group/person data into local store.""" groups = await self.call_api("get", "persongroups") - remove_tasks = [] + remove_tasks: list[Coroutine[Any, Any, None]] = [] new_entities = [] for group in groups: g_id = group["personGroupId"] @@ -293,7 +295,7 @@ async def update_store(self): self._store[g_id][person["name"]] = person["personId"] if remove_tasks: - await asyncio.gather(remove_tasks) + await asyncio.gather(*remove_tasks) await self._component.async_add_entities(new_entities) async def call_api(self, method, function, data=None, binary=False, params=None):