Skip to content

Commit

Permalink
Correct ServiceCall into SupportsResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Jul 23, 2023
1 parent ba0c79d commit f3acbd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/zha_toolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit f3acbd7

Please sign in to comment.