Correct homeassistant.helpers.trigger._trigger_action_wrapper (#153983)

This commit is contained in:
Erik Montnemery
2025-10-08 17:33:44 +02:00
committed by GitHub
parent 438c4c7871
commit 045b9d7f01
2 changed files with 5 additions and 5 deletions

View File

@@ -169,7 +169,7 @@ class CalendarEventListener:
def __init__(
self,
hass: HomeAssistant,
job: HassJob[..., Coroutine[Any, Any, None]],
job: HassJob[..., Coroutine[Any, Any, None] | Any],
trigger_data: dict[str, Any],
fetcher: QueuedEventFetcher,
) -> None:

View File

@@ -260,11 +260,11 @@ class TriggerConfig:
class TriggerActionType(Protocol):
"""Protocol type for trigger action callback."""
async def __call__(
def __call__(
self,
run_variables: dict[str, Any],
context: Context | None = None,
) -> Any:
) -> Coroutine[Any, Any, Any] | Any:
"""Define action callback type."""
@@ -294,7 +294,7 @@ class PluggableActionsEntry:
actions: dict[
object,
tuple[
HassJob[[dict[str, Any], Context | None], Coroutine[Any, Any, None]],
HassJob[[dict[str, Any], Context | None], Coroutine[Any, Any, None] | Any],
dict[str, Any],
],
] = field(default_factory=dict)
@@ -477,7 +477,7 @@ def _trigger_action_wrapper(
else:
@functools.wraps(action)
async def with_vars(
def with_vars(
run_variables: dict[str, Any], context: Context | None = None
) -> Any:
"""Wrap action with extra vars."""