add tcp/udp port to config validation (#2854)

This commit is contained in:
Pascal Vizeli 2016-08-17 05:55:29 +02:00 committed by Paulus Schoutsen
parent 781fe9c54e
commit 4fcfffc172
6 changed files with 26 additions and 20 deletions

View file

@ -29,6 +29,7 @@ latitude = vol.All(vol.Coerce(float), vol.Range(min=-90, max=90),
longitude = vol.All(vol.Coerce(float), vol.Range(min=-180, max=180),
msg='invalid longitude')
sun_event = vol.All(vol.Lower, vol.Any(SUN_EVENT_SUNSET, SUN_EVENT_SUNRISE))
port = vol.All(vol.Coerce(int), vol.Range(min=1, max=65535))
# typing typevar
T = TypeVar('T')