Skip to content

Commit 045b9d7

Browse files
authored
Correct homeassistant.helpers.trigger._trigger_action_wrapper (home-assistant#153983)
1 parent 438c4c7 commit 045b9d7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

homeassistant/components/calendar/trigger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class CalendarEventListener:
169169
def __init__(
170170
self,
171171
hass: HomeAssistant,
172-
job: HassJob[..., Coroutine[Any, Any, None]],
172+
job: HassJob[..., Coroutine[Any, Any, None] | Any],
173173
trigger_data: dict[str, Any],
174174
fetcher: QueuedEventFetcher,
175175
) -> None:

homeassistant/helpers/trigger.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ class TriggerConfig:
260260
class TriggerActionType(Protocol):
261261
"""Protocol type for trigger action callback."""
262262

263-
async def __call__(
263+
def __call__(
264264
self,
265265
run_variables: dict[str, Any],
266266
context: Context | None = None,
267-
) -> Any:
267+
) -> Coroutine[Any, Any, Any] | Any:
268268
"""Define action callback type."""
269269

270270

@@ -294,7 +294,7 @@ class PluggableActionsEntry:
294294
actions: dict[
295295
object,
296296
tuple[
297-
HassJob[[dict[str, Any], Context | None], Coroutine[Any, Any, None]],
297+
HassJob[[dict[str, Any], Context | None], Coroutine[Any, Any, None] | Any],
298298
dict[str, Any],
299299
],
300300
] = field(default_factory=dict)
@@ -477,7 +477,7 @@ async def async_with_vars(
477477
else:
478478

479479
@functools.wraps(action)
480-
async def with_vars(
480+
def with_vars(
481481
run_variables: dict[str, Any], context: Context | None = None
482482
) -> Any:
483483
"""Wrap action with extra vars."""

0 commit comments

Comments
 (0)