Skip to content

Commit

Permalink
fix api change
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscamicas committed Oct 18, 2024
1 parent 71522f5 commit ca66786
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions custom_components/gazdebordeaux/gazdebordeaux.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from json.decoder import JSONDecodeError
from typing import List, Any

DATA_URL = "https://life.gazdebordeaux.fr/api{0}/consumptions"
LOGIN_URL = "https://life.gazdebordeaux.fr/api/login_check"
ME_URL = "https://life.gazdebordeaux.fr/api/users/me"
DATA_URL = "https://lifeapi.gazdebordeaux.fr{0}/consumptions"
LOGIN_URL = "https://lifeapi.gazdebordeaux.fr/login_check"
ME_URL = "https://lifeapi.gazdebordeaux.fr/users/me"

INPUT_DATE_FORMAT = "%Y-%m-%d"

Expand Down Expand Up @@ -59,7 +59,7 @@ async def async_get_total_usage(self):

d = monthly_data["total"]
return TotalUsageRead(
amountOfEnergy = d["amountOfEnergy"],
amountOfEnergy = d["kwh"],
volumeOfEnergy = d["volumeOfEnergy"],
price = d["price"],
)
Expand All @@ -75,7 +75,7 @@ async def async_get_daily_usage(self, start: datetime|None, end: datetime|None)
continue
usageReads.append(DailyUsageRead(
date = datetime.strptime(d, INPUT_DATE_FORMAT).replace(tzinfo=paris_tz),
amountOfEnergy = daily_data[d]["amountOfEnergy"],
amountOfEnergy = daily_data[d]["kwh"],
volumeOfEnergy = daily_data[d]["volumeOfEnergy"],
price = daily_data[d]["price"],
ratio = daily_data[d]["ratio"],
Expand Down

0 comments on commit ca66786

Please sign in to comment.