mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 19:09:32 +00:00
Add config validator helper positive_float (#41640)
This commit is contained in:
@@ -98,6 +98,7 @@ TIME_PERIOD_ERROR = "offset {} should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS
|
||||
byte = vol.All(vol.Coerce(int), vol.Range(min=0, max=255))
|
||||
small_float = vol.All(vol.Coerce(float), vol.Range(min=0, max=1))
|
||||
positive_int = vol.All(vol.Coerce(int), vol.Range(min=0))
|
||||
positive_float = vol.All(vol.Coerce(float), vol.Range(min=0))
|
||||
latitude = vol.All(
|
||||
vol.Coerce(float), vol.Range(min=-90, max=90), msg="invalid latitude"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user