From f3acbd73cf07834a92ab9f231107fd934166a8fa Mon Sep 17 00:00:00 2001 From: mdeweerd Date: Mon, 24 Jul 2023 00:01:08 +0200 Subject: [PATCH] Correct ServiceCall into SupportsResponse --- custom_components/zha_toolkit/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/zha_toolkit/__init__.py b/custom_components/zha_toolkit/__init__.py index e7c14f3..4793cb3 100644 --- a/custom_components/zha_toolkit/__init__.py +++ b/custom_components/zha_toolkit/__init__.py @@ -644,7 +644,7 @@ def register_services(hass): # noqa: C901 is_response_data_supported = u.is_ha_ge("2023.7.0") if is_response_data_supported: - from home_assistant.core import ServiceCall + from homeassistant.core import ServiceCall, SupportsResponse async def toolkit_service(service): """Run command from toolkit module.""" @@ -811,7 +811,7 @@ async def toolkit_service(service): key, toolkit_service, schema=value, - supports_response=ServiceCall.OPTIONAL, # type:ignore[undefined-variable] + supports_response=SupportsResponse.OPTIONAL, # type:ignore[undefined-variable] ) else: hass.services.async_register(