From c3f45d594bc01d1b3e7c1aa9d309e3889ae3e400 Mon Sep 17 00:00:00 2001 From: abmantis Date: Sun, 28 Sep 2025 12:59:16 +0100 Subject: [PATCH] Return future from runner --- homeassistant/helpers/trigger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/helpers/trigger.py b/homeassistant/helpers/trigger.py index 06a8e4a64a2..ae19d9f442a 100644 --- a/homeassistant/helpers/trigger.py +++ b/homeassistant/helpers/trigger.py @@ -262,7 +262,7 @@ class TriggerActionRunnerType(Protocol): description: str, extra_trigger_payload: dict[str, Any], context: Context | None = None, - ) -> None: + ) -> asyncio.Future[Any] | None: """Define trigger action runner type.""" @@ -518,7 +518,7 @@ async def _async_attach_trigger_cls( description: str, extra_trigger_payload: dict[str, Any], context: Context | None = None, - ) -> None: + ) -> asyncio.Future[Any] | None: """Run action with trigger variables.""" payload = { @@ -530,7 +530,7 @@ async def _async_attach_trigger_cls( } } - hass.async_run_hass_job(job, payload, context) + return hass.async_run_hass_job(job, payload, context) trigger = trigger_cls( hass,