diff --git a/homeassistant/components/zha/core/endpoint.py b/homeassistant/components/zha/core/endpoint.py index 7d9933a56cb..32483a3bc53 100644 --- a/homeassistant/components/zha/core/endpoint.py +++ b/homeassistant/components/zha/core/endpoint.py @@ -6,7 +6,7 @@ import asyncio from collections.abc import Awaitable, Callable import functools import logging -from typing import TYPE_CHECKING, Any, Final, TypeVar +from typing import TYPE_CHECKING, Any, Final from homeassistant.const import Platform from homeassistant.core import callback @@ -29,7 +29,6 @@ ATTR_IN_CLUSTERS: Final[str] = "input_clusters" ATTR_OUT_CLUSTERS: Final[str] = "output_clusters" _LOGGER = logging.getLogger(__name__) -CALLABLE_T = TypeVar("CALLABLE_T", bound=Callable) class Endpoint: @@ -209,7 +208,7 @@ class Endpoint: def async_new_entity( self, platform: Platform, - entity_class: CALLABLE_T, + entity_class: type, unique_id: str, cluster_handlers: list[ClusterHandler], **kwargs: Any, diff --git a/homeassistant/helpers/config_validation.py b/homeassistant/helpers/config_validation.py index 41d6a58ab1a..a144e95988a 100644 --- a/homeassistant/helpers/config_validation.py +++ b/homeassistant/helpers/config_validation.py @@ -583,7 +583,7 @@ def slug(value: Any) -> str: def schema_with_slug_keys( - value_schema: _T | Callable, *, slug_validator: Callable[[Any], str] = slug + value_schema: dict | Callable, *, slug_validator: Callable[[Any], str] = slug ) -> Callable: """Ensure dicts have slugs as keys. diff --git a/tests/components/bluetooth/test_active_update_coordinator.py b/tests/components/bluetooth/test_active_update_coordinator.py index e3178f84336..0aa59ed0c78 100644 --- a/tests/components/bluetooth/test_active_update_coordinator.py +++ b/tests/components/bluetooth/test_active_update_coordinator.py @@ -17,7 +17,6 @@ from homeassistant.components.bluetooth import ( BluetoothServiceInfoBleak, ) from homeassistant.components.bluetooth.active_update_coordinator import ( - _T, ActiveBluetoothDataUpdateCoordinator, ) from homeassistant.core import CoreState, HomeAssistant @@ -68,7 +67,7 @@ class MyCoordinator(ActiveBluetoothDataUpdateCoordinator[dict[str, Any]]): needs_poll_method: Callable[[BluetoothServiceInfoBleak, float | None], bool], poll_method: Callable[ [BluetoothServiceInfoBleak], - Coroutine[Any, Any, _T], + Coroutine[Any, Any, dict[str, Any]], ] | None = None, poll_debouncer: Debouncer[Coroutine[Any, Any, None]] | None = None,