Use const.SUN_EVENT_* more (#18039)
This commit is contained in:
parent
dcc46226ee
commit
9c840f93f0
11 changed files with 82 additions and 67 deletions
|
@ -535,7 +535,8 @@ SUN_CONDITION_SCHEMA = vol.All(vol.Schema({
|
|||
vol.Required(CONF_CONDITION): 'sun',
|
||||
vol.Optional('before'): sun_event,
|
||||
vol.Optional('before_offset'): time_period,
|
||||
vol.Optional('after'): vol.All(vol.Lower, vol.Any('sunset', 'sunrise')),
|
||||
vol.Optional('after'): vol.All(vol.Lower, vol.Any(
|
||||
SUN_EVENT_SUNSET, SUN_EVENT_SUNRISE)),
|
||||
vol.Optional('after_offset'): time_period,
|
||||
}), has_at_least_one_key('before', 'after'))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue