1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Time condition can also accept an input_datetime Entity ID (#39676)

This commit is contained in:
Franck Nijhof
2020-09-06 16:06:09 +02:00
committed by GitHub
parent f298281ec4
commit da9b077c11
3 changed files with 124 additions and 13 deletions

View File

@@ -956,8 +956,8 @@ TIME_CONDITION_SCHEMA = vol.All(
vol.Schema(
{
vol.Required(CONF_CONDITION): "time",
"before": time,
"after": time,
"before": vol.Any(time, vol.All(str, entity_domain("input_datetime"))),
"after": vol.Any(time, vol.All(str, entity_domain("input_datetime"))),
"weekday": weekdays,
}
),