mirror of
https://github.com/sascha-hemi/hacs_waste_collection_schedule.git
synced 2026-03-21 04:06:03 +01:00
fix bug where random_fetch_time_offset: 0 leads to an error because random.randrange(0, 0) is called
This commit is contained in:
@@ -225,7 +225,9 @@ class WasteCollectionApi:
|
||||
def _fetch_callback(self, *_):
|
||||
async_call_later(
|
||||
self._hass,
|
||||
randrange(0, 60 * self._random_fetch_time_offset),
|
||||
randrange(0, 60 * self._random_fetch_time_offset)
|
||||
if self._random_fetch_time_offset > 0
|
||||
else 0,
|
||||
self._fetch_now_callback,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user