Add some more required/optional tags to condition schemas (#58424)
parent
f1b082a369
commit
5deeeed672
|
@ -1029,13 +1029,13 @@ TIME_CONDITION_SCHEMA = vol.All(
|
|||
{
|
||||
**CONDITION_BASE_SCHEMA,
|
||||
vol.Required(CONF_CONDITION): "time",
|
||||
"before": vol.Any(
|
||||
vol.Optional("before"): vol.Any(
|
||||
time, vol.All(str, entity_domain(["input_datetime", "sensor"]))
|
||||
),
|
||||
"after": vol.Any(
|
||||
vol.Optional("after"): vol.Any(
|
||||
time, vol.All(str, entity_domain(["input_datetime", "sensor"]))
|
||||
),
|
||||
"weekday": weekdays,
|
||||
vol.Optional("weekday"): weekdays,
|
||||
}
|
||||
),
|
||||
has_at_least_one_key("before", "after", "weekday"),
|
||||
|
@ -1054,7 +1054,7 @@ ZONE_CONDITION_SCHEMA = vol.Schema(
|
|||
**CONDITION_BASE_SCHEMA,
|
||||
vol.Required(CONF_CONDITION): "zone",
|
||||
vol.Required(CONF_ENTITY_ID): entity_ids,
|
||||
"zone": entity_ids,
|
||||
vol.Required("zone"): entity_ids,
|
||||
# To support use_trigger_value in automation
|
||||
# Deprecated 2016/04/25
|
||||
vol.Optional("event"): vol.Any("enter", "leave"),
|
||||
|
|
Loading…
Reference in New Issue