diff --git a/apps/predbat/fetch.py b/apps/predbat/fetch.py index 2a7fff36c..befd5bfed 100644 --- a/apps/predbat/fetch.py +++ b/apps/predbat/fetch.py @@ -652,7 +652,7 @@ def minute_data( if to_key: to_value = item[to_key] if not to_value: - to_time = now + timedelta(minutes=24 * 60 * self.forecast_days) + to_time = now + timedelta(minutes=24 * 60 * days) else: to_time = str2time(item[to_key]) else: