Skip to content

Commit

Permalink
fix: Removed excessive logging that did not adhere to log settings
Browse files Browse the repository at this point in the history
  • Loading branch information
BottlecapDave committed Apr 20, 2024
1 parent 82f271e commit cb27d6d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion custom_components/octopus_energy/api_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,6 @@ async def async_get_gas_consumption(self, mprn, serial_number, period_from, peri
query_string = '&'.join(query_params)

url = f"{self._base_url}/v1/gas-meter-points/{mprn}/meters/{serial_number}/consumption{f'?{query_string}' if len(query_string) > 0 else ''}"
print(url)
async with client.get(url, auth=auth) as response:
data = await self.__async_read_response__(response, url)
if (data is not None and "results" in data):
Expand Down
1 change: 0 additions & 1 deletion custom_components/octopus_energy/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def get_off_peak_cost(current: datetime, rates: list):
if rates is not None:
for rate in rates:
if rate["start"] >= today_start and rate["end"] <= today_end:
print(rate["start"])
value = rate["value_inc_vat"]
rate_charges[value] = (rate_charges[value] if value in rate_charges else value)
if off_peak_cost is None or off_peak_cost > rate["value_inc_vat"]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,6 @@ def fire_event(name, metadata):

assert len(result.rates) == len(expected_rates)
for index, rate in enumerate(result.rates):
print(f"start: {result.rates[index]['start']} end: {result.rates[index]['end']}")
if rate["start"] >= intelligent_dispatches.completed[0].start and rate["end"] <= intelligent_dispatches.completed[0].end:
assert result.rates[index]["start"] == expected_rates[index]["start"]
assert result.rates[index]["end"] == expected_rates[index]["end"]
Expand Down
1 change: 0 additions & 1 deletion tests/unit/intelligent/test_adjust_intelligent_rates.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ async def test_when_planned_smart_charge_dispatch_spans_two_parts_then_rates_adj
assert len(rates) == len(adjusted_rates)
for index, rate in enumerate(rates):
if rate["start"] >= as_utc(parse_datetime("2022-10-10T21:30:00Z")) and rate["end"] <= as_utc(parse_datetime("2022-10-10T23:30:00Z")):
print(f"start: {rate['start']}; end: {rate['end']}")
assert rate["start"] == adjusted_rates[index]["start"]
assert rate["end"] == adjusted_rates[index]["end"]
assert rate["tariff_code"] == adjusted_rates[index]["tariff_code"]
Expand Down

0 comments on commit cb27d6d

Please sign in to comment.