Fix non-thread-safe operations in media_extractor (#116065)

pull/116072/head
J. Nick Koston 2024-04-24 02:19:18 +02:00 committed by GitHub
parent 62dadc47ff
commit f9c2cd73f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ CONFIG_SCHEMA = vol.Schema(
)
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the media extractor service."""
async def extract_media_url(call: ServiceCall) -> ServiceResponse:
@ -114,7 +114,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
supports_response=SupportsResponse.ONLY,
)
hass.services.register(
hass.services.async_register(
DOMAIN,
SERVICE_PLAY_MEDIA,
play_media,