Add wait_for_trigger script action (#38075)
* Add wait_for_trigger script action * Add tests * Change script integration to use config validator
This commit is contained in:
1 parent
c1ed584f2d
commit
76ead858cf
10 files changed
+288
-53
No files matched your search
@@ -1,7 +1,8 @@
|
||||
"""Triggers."""
|
||||
import asyncio
|
||||
import logging
|
||||
from typing import Any, Callable, List, Optional
|
||||
from types import MappingProxyType
|
||||
from typing import Any, Callable, Dict, List, Optional, Union
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
@@ -59,12 +60,14 @@ async def async_initialize_triggers(
|
||||
name: str,
|
||||
log_cb: Callable,
|
||||
home_assistant_start: bool = False,
|
||||
variables: Optional[Union[Dict[str, Any], MappingProxyType]] = None,
|
||||
) -> Optional[CALLBACK_TYPE]:
|
||||
"""Initialize triggers."""
|
||||
info = {
|
||||
"domain": domain,
|
||||
"name": name,
|
||||
"home_assistant_start": home_assistant_start,
|
||||
"variables": variables,
|
||||
}
|
||||
|
||||
triggers = []
|
||||
|
||||
Reference in new issue
Block a user