Allow templates for enabling conditions (#117047)

* Allow templates for enabling automation conditions

* Use `cv.template` instead of `cv.template_complex`
This commit is contained in:
Matthias Alphart
2024-05-15 21:03:28 +02:00
committed by GitHub
parent aa2485c7b9
commit 076f57ee07
3 changed files with 61 additions and 11 deletions

View File

@ -1356,7 +1356,7 @@ NUMERIC_STATE_THRESHOLD_SCHEMA = vol.Any(
CONDITION_BASE_SCHEMA = {
vol.Optional(CONF_ALIAS): string,
vol.Optional(CONF_ENABLED): boolean,
vol.Optional(CONF_ENABLED): vol.Any(boolean, template),
}
NUMERIC_STATE_CONDITION_SCHEMA = vol.All(