Add consider_home and source_type to device_tracker.see service (#12849)
* Add consider_home and source_type to device_tracker.see service * Use schema instead of manual validation * Extend schema to validate all keys * Fix style * Set battery level to int
This commit is contained in:
parent
6734c966b3
commit
3ba19c52d5
2 changed files with 43 additions and 22 deletions
|
@ -36,6 +36,7 @@ latitude = vol.All(vol.Coerce(float), vol.Range(min=-90, max=90),
|
|||
msg='invalid latitude')
|
||||
longitude = vol.All(vol.Coerce(float), vol.Range(min=-180, max=180),
|
||||
msg='invalid longitude')
|
||||
gps = vol.ExactSequence([latitude, 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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue