Skip to content

Commit

Permalink
fix: Fixed incorrect logging for debugging entries
Browse files Browse the repository at this point in the history
  • Loading branch information
BottlecapDave committed Jun 18, 2022
1 parent b29900c commit d5fad1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/octopus_energy/api_client.py
Expand Up @@ -93,7 +93,7 @@ async def async_get_electricity_day_night_rates(self, product_code, tariff_code,

# Because we retrieve our day and night periods separately over a 2 day period, we need to sort our rates
results.sort(key=self.__get_valid_from)
_LOGGER.error(results)
_LOGGER.debug(results)

return results

Expand Down Expand Up @@ -250,7 +250,7 @@ def __is_between_local_times(self, rate, target_from_time, target_to_time):
from_date_time = as_local(parse_datetime(rate_local_valid_from.strftime(f"%Y-%m-%dT{target_from_time}{local_now.strftime('%z')}")))
to_date_time = as_local(parse_datetime(rate_local_valid_from.strftime(f"%Y-%m-%dT{target_to_time}{local_now.strftime('%z')}")))

_LOGGER.error('is_valid: %s; from_date_time: %s; to_date_time: %s; rate_local_valid_from: %s; rate_local_valid_to: %s', rate_local_valid_from >= from_date_time and rate_local_valid_from < to_date_time, from_date_time, to_date_time, rate_local_valid_from, rate_local_valid_to)
_LOGGER.debug('is_valid: %s; from_date_time: %s; to_date_time: %s; rate_local_valid_from: %s; rate_local_valid_to: %s', rate_local_valid_from >= from_date_time and rate_local_valid_from < to_date_time, from_date_time, to_date_time, rate_local_valid_from, rate_local_valid_to)

return rate_local_valid_from >= from_date_time and rate_local_valid_from < to_date_time

Expand Down

0 comments on commit d5fad1d

Please sign in to comment.