mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Allow overriding trigger runner helper
This commit is contained in:
@@ -23,8 +23,8 @@ from homeassistant.helpers.automation import move_top_level_schema_fields_to_opt
|
||||
from homeassistant.helpers.trigger import (
|
||||
DATA_PLUGGABLE_ACTIONS,
|
||||
PluggableAction,
|
||||
RunTriggerActionCallback,
|
||||
Trigger,
|
||||
TriggerActionRunnerType,
|
||||
_async_get_trigger_platform,
|
||||
async_initialize_triggers,
|
||||
async_validate_trigger_config,
|
||||
@@ -463,8 +463,8 @@ async def test_platform_multiple_triggers(hass: HomeAssistant) -> None:
|
||||
class MockTrigger1(MockTrigger):
|
||||
"""Mock trigger 1."""
|
||||
|
||||
async def async_attach(
|
||||
self, run_action: TriggerActionRunnerType
|
||||
async def async_attach_runner(
|
||||
self, run_action: RunTriggerActionCallback
|
||||
) -> CALLBACK_TYPE:
|
||||
"""Attach a trigger."""
|
||||
run_action("trigger 1 desc", {"extra": "test_trigger_1"})
|
||||
@@ -472,8 +472,8 @@ async def test_platform_multiple_triggers(hass: HomeAssistant) -> None:
|
||||
class MockTrigger2(MockTrigger):
|
||||
"""Mock trigger 2."""
|
||||
|
||||
async def async_attach(
|
||||
self, run_action: TriggerActionRunnerType
|
||||
async def async_attach_runner(
|
||||
self, run_action: RunTriggerActionCallback
|
||||
) -> CALLBACK_TYPE:
|
||||
"""Attach a trigger."""
|
||||
run_action("trigger 2 desc", {"extra": "test_trigger_2"})
|
||||
|
||||
Reference in New Issue
Block a user