[core] Drop Python 3.11 support (#17280)

This commit is contained in:
Jonathan Swoboda
2026-06-29 12:32:28 -04:00
committed by GitHub
parent 2778c62d07
commit b8690c8e31
16 changed files with 58 additions and 152 deletions
+2 -3
View File
@@ -19,7 +19,6 @@ from aioesphomeapi import (
_LOGGER = logging.getLogger(__name__)
T = TypeVar("T", bound=EntityInfo)
S = TypeVar("S", bound=EntityState)
@@ -58,7 +57,7 @@ async def wait_for_state(
return await asyncio.wait_for(future, timeout=timeout)
def find_entity(
def find_entity[T: EntityInfo](
entities: list[EntityInfo],
object_id_substring: str,
entity_type: type[T] | None = None,
@@ -86,7 +85,7 @@ def find_entity(
return None
def require_entity(
def require_entity[T: EntityInfo](
entities: list[EntityInfo],
object_id_substring: str,
entity_type: type[T] | None = None,