Skip to content

Commit

Permalink
Increase number of days lookback for API call
Browse files Browse the repository at this point in the history
  • Loading branch information
codyc1515 committed Nov 22, 2023
1 parent 23ae363 commit 4e279a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/meridian_energy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def login(self):
def get_data(self):
# Get todays date
today = datetime.now().strftime('%d/%m/%Y')
seven_days_ago = (datetime.now() - timedelta(days=7)).strftime('%d/%m/%Y')
seven_days_ago = (datetime.now() - timedelta(days=365)).strftime('%d/%m/%Y')

response = self._session.get(self._url_base + "reports/consumption_data/detailed_export?date_from=" + seven_days_ago + "&date_to=" + today + "&all_icps=&download=true")
if response.status_code == 200:
Expand Down

0 comments on commit 4e279a4

Please sign in to comment.