Update google_translate to use async_add_executor_job (#41925)

This commit is contained in:
J. Nick Koston 2020-10-16 06:15:01 -05:00 committed by GitHub
parent c9ba5bfebd
commit 83af805522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,7 +123,9 @@ class GoogleProvider(Provider):
data = b""
for idx, part in enumerate(message_parts):
part_token = await self.hass.async_add_job(token.calculate_token, part)
part_token = await self.hass.async_add_executor_job(
token.calculate_token, part
)
url_param = {
"ie": "UTF-8",