Skip to content

Commit aabac95

Browse files
mgazzaclaude
andauthored
Fix minute_data function to use days parameter instead of self.forecast_days (#2719)
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 973e17e commit aabac95

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
@@ -653,7 +653,7 @@ def minute_data(
653653
if to_key:
654654
to_value = item[to_key]
655655
if not to_value:
656-
to_time = now + timedelta(minutes=24 * 60 * self.forecast_days)
656+
to_time = now + timedelta(minutes=24 * 60 * days)
657657
else:
658658
to_time = str2time(item[to_key])
659659
else:

0 commit comments

Comments
 (0)