Skip to content

Commit a653eaa

Browse files
mgazzaclaude
andcommitted
Fix minute_data function to use days parameter instead of self.forecast_days
The minute_data function has a 'days' parameter but was incorrectly using self.forecast_days in one location (line 655) when calculating to_time. This could cause inconsistent behavior when the function is called with a different days value than self.forecast_days. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 94a9294 commit a653eaa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/predbat/fetch.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def minute_data(
652652
if to_key:
653653
to_value = item[to_key]
654654
if not to_value:
655-
to_time = now + timedelta(minutes=24 * 60 * self.forecast_days)
655+
to_time = now + timedelta(minutes=24 * 60 * days)
656656
else:
657657
to_time = str2time(item[to_key])
658658
else:

0 commit comments

Comments
 (0)