Allow templates for delays in scripts (#2560)

This commit is contained in:
Teagan Glenn 2016-07-20 12:26:17 -06:00 committed by Johann Kellerman
parent 53f9809567
commit ae5dfbdf55
3 changed files with 47 additions and 3 deletions

View file

@ -376,7 +376,9 @@ CONDITION_SCHEMA = vol.Any(
_SCRIPT_DELAY_SCHEMA = vol.Schema({
vol.Optional(CONF_ALIAS): string,
vol.Required("delay"): vol.All(time_period, positive_timedelta)
vol.Required("delay"): vol.Any(
vol.All(time_period, positive_timedelta),
template)
})
SCRIPT_SCHEMA = vol.All(