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,5 +1,6 @@
|
||||
"""Provide configuration end points for scripts."""
|
||||
from homeassistant.components.script import DOMAIN, SCRIPT_ENTRY_SCHEMA
|
||||
from homeassistant.components.script.config import async_validate_config_item
|
||||
from homeassistant.config import SCRIPT_CONFIG_PATH
|
||||
from homeassistant.const import SERVICE_RELOAD
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@@ -16,12 +17,13 @@ async def async_setup(hass):
|
||||
|
||||
hass.http.register_view(
|
||||
EditKeyBasedConfigView(
|
||||
"script",
|
||||
DOMAIN,
|
||||
"config",
|
||||
SCRIPT_CONFIG_PATH,
|
||||
cv.slug,
|
||||
SCRIPT_ENTRY_SCHEMA,
|
||||
post_write_hook=hook,
|
||||
data_validator=async_validate_config_item,
|
||||
)
|
||||
)
|
||||
return True
|
||||
Reference in new issue
Block a user