Use call_soon_threadsafe in face processing of image_processing (#106168)
This commit is contained in:
parent
e75357980a
commit
88ea5f7a54
1 changed files with 1 additions and 4 deletions
|
@ -24,7 +24,6 @@ from homeassistant.helpers.config_validation import make_entity_service_schema
|
|||
from homeassistant.helpers.entity import Entity, EntityDescription
|
||||
from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.util.async_ import run_callback_threadsafe
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -233,9 +232,7 @@ class ImageProcessingFaceEntity(ImageProcessingEntity):
|
|||
|
||||
def process_faces(self, faces: list[FaceInformation], total: int) -> None:
|
||||
"""Send event with detected faces and store data."""
|
||||
run_callback_threadsafe(
|
||||
self.hass.loop, self.async_process_faces, faces, total
|
||||
).result()
|
||||
self.hass.loop.call_soon_threadsafe(self.async_process_faces, faces, total)
|
||||
|
||||
@callback
|
||||
def async_process_faces(self, faces: list[FaceInformation], total: int) -> None:
|
||||
|
|
Loading…
Add table
Reference in a new issue