Allow templates for enabling actions (#117049)

* Allow templates for enabling automation actions

* Use `cv.template` instead of `cv.template_complex`

* Rename test function
This commit is contained in:
Matthias Alphart 2024-05-15 21:03:52 +02:00 committed by GitHub
parent 076f57ee07
commit ec4c8ae228
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 59 additions and 10 deletions

View file

@ -1311,7 +1311,7 @@ SCRIPT_SCHEMA = vol.All(ensure_list, [script_action])
SCRIPT_ACTION_BASE_SCHEMA = {
vol.Optional(CONF_ALIAS): string,
vol.Optional(CONF_CONTINUE_ON_ERROR): boolean,
vol.Optional(CONF_ENABLED): boolean,
vol.Optional(CONF_ENABLED): vol.Any(boolean, template),
}
EVENT_SCHEMA = vol.Schema(