diff --git a/aioesphomeapi/connection.py b/aioesphomeapi/connection.py index 42a0989c..f13a5ef8 100644 --- a/aioesphomeapi/connection.py +++ b/aioesphomeapi/connection.py @@ -158,7 +158,7 @@ def _cleanup(self) -> None: if self.on_stop and self._connect_complete: - def _remove_on_stop_task(_fut: asyncio.Future) -> None: + def _remove_on_stop_task(_fut: asyncio.Future[None]) -> None: """Remove the stop task from the reconnect loop. We need to do this because the asyncio does not hold diff --git a/aioesphomeapi/reconnect_logic.py b/aioesphomeapi/reconnect_logic.py index 29682ec4..717631c4 100644 --- a/aioesphomeapi/reconnect_logic.py +++ b/aioesphomeapi/reconnect_logic.py @@ -201,7 +201,7 @@ async def stop(self) -> None: await self._stop_zc_listen() def stop_callback(self) -> None: - def _remove_stop_task(_fut: asyncio.Future) -> None: + def _remove_stop_task(_fut: asyncio.Future[None]) -> None: """Remove the stop task from the reconnect loop. We need to do this because the asyncio does not hold