Be flexible in what we accept for script.delay configuration. (#1738)
Accept delay configuration even when someone forgets to indent the time specification. Also removed 'weeks' and 'microseconds' from acceptable delay values. There is a new homeassistant release every 2 weeks and running scripts are not persisting across restarts. And there is still the option of using (weeks*7) days if the long delay is really necessary. And if someone really depends on microsecond delay precision we are unlikely to be able to provide this accuracy, even milliseconds is suspect for that matter but will at least allow us to specify some subsecond delay.
This commit is contained in:
parent
5b17f629ad
commit
29c30861bf
3 changed files with 66 additions and 15 deletions
|
@ -16,6 +16,7 @@ from homeassistant.util import slugify
|
|||
# Home Assistant types
|
||||
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))
|
||||
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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue