diff --git a/homeassistant/core.py b/homeassistant/core.py index 819db0b6825..097be448867 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -1330,7 +1330,7 @@ class ServiceRegistry: self, domain: str, service: str, - service_func: Callable, + service_func: Callable[[ServiceCall], Awaitable[None] | None], schema: vol.Schema | None = None, ) -> None: """ @@ -1347,7 +1347,7 @@ class ServiceRegistry: self, domain: str, service: str, - service_func: Callable, + service_func: Callable[[ServiceCall], Awaitable[None] | None], schema: vol.Schema | None = None, ) -> None: """ diff --git a/homeassistant/helpers/entity_component.py b/homeassistant/helpers/entity_component.py index 66d733619d0..6e7e2a6302e 100644 --- a/homeassistant/helpers/entity_component.py +++ b/homeassistant/helpers/entity_component.py @@ -198,7 +198,7 @@ class EntityComponent: if isinstance(schema, dict): schema = cv.make_entity_service_schema(schema) - async def handle_service(call: Callable) -> None: + async def handle_service(call: ServiceCall) -> None: """Handle the service.""" await self.hass.helpers.service.entity_service_call( self._platforms.values(), func, call, required_features diff --git a/homeassistant/helpers/service.py b/homeassistant/helpers/service.py index bbf605e6bff..bad233c006a 100644 --- a/homeassistant/helpers/service.py +++ b/homeassistant/helpers/service.py @@ -716,7 +716,7 @@ def async_register_admin_service( hass: HomeAssistant, domain: str, service: str, - service_func: Callable[[ServiceCall], Awaitable | None], + service_func: Callable[[ServiceCall], Awaitable[None] | None], schema: vol.Schema = vol.Schema({}, extra=vol.PREVENT_EXTRA), ) -> None: """Register a service that requires admin access."""