Update image_processing to use async_add_executor_job (#41810)

This commit is contained in:
J. Nick Koston 2020-10-14 01:19:39 -05:00 committed by GitHub
parent 6c0d5fa1d6
commit 6d05729e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,7 @@ class ImageProcessingEntity(Entity):
async def async_process_image(self, image):
"""Process image."""
return await self.hass.async_add_job(self.process_image, image)
return await self.hass.async_add_executor_job(self.process_image, image)
async def async_update(self):
"""Update image and process it.