Support longer-than-60-second scan_interval and interval_seconds (#5147)
* Update scan_interval and interval_seconds max to 1 day vs. 60 seconds * Format fixes * Add docstring on unittest. * Added and implemented new async_track_time_interval helper. * Format fixes, removed unused import. * Undid whoops on unsub_polling. * Updated unit tests for scan_interval. * Added unit test for track_time_interval. * Allow other forms of time interval input for scan_interval and interval_seconds
This commit is contained in:
parent
f88b5a9c5e
commit
a36ca62445
6 changed files with 81 additions and 16 deletions
|
@ -405,8 +405,7 @@ def key_dependency(key, dependency):
|
|||
|
||||
PLATFORM_SCHEMA = vol.Schema({
|
||||
vol.Required(CONF_PLATFORM): string,
|
||||
vol.Optional(CONF_SCAN_INTERVAL):
|
||||
vol.All(vol.Coerce(int), vol.Range(min=1)),
|
||||
vol.Optional(CONF_SCAN_INTERVAL): time_period
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
EVENT_SCHEMA = vol.Schema({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue