Skip to content

Commit 5b2fd3f

Browse files
authored
Trim fetched values to t-15 from now for nednl consumer
Value at now is not available, this will prevent us from pulling the dummy value that API provides
1 parent 9c9c657 commit 5b2fd3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solar_consumer/data/fetch_nl_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def fetch_nl_data(historic_or_forecast: str = "generation"):
176176
# remove any future data
177177
if historic_or_forecast == "generation":
178178
# we pull a bit of future data, so update to only return historic values
179-
end_date = now
179+
end_date = now - timedelta(minutes=15)
180180

181181
all_data = all_data[all_data["target_datetime_utc"] <= end_date]
182182
all_data = all_data[all_data["target_datetime_utc"] >= start_date]

0 commit comments

Comments
 (0)