Use const.SUN_EVENT_* more (#18039)

This commit is contained in:
Ville Skyttä 2018-10-31 10:10:28 +02:00 committed by Daniel Høyer Iversen
parent dcc46226ee
commit 9c840f93f0
11 changed files with 82 additions and 67 deletions

View file

@ -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'))