Skip to content

Commit

Permalink
fix: explicit method naming
Browse files Browse the repository at this point in the history
  • Loading branch information
rokam committed Dec 26, 2023
1 parent 321e3b4 commit 42a6e4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sunweg/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ def month_stats_production(self, year: int, month: int, plant: Plant, inverter:
:return: list of daily energy production statistics
:rtype: list[ProductionStats]
"""
return self.month_stats_production(year, month, plant.id, inverter.id if inverter is not None else None, retry)
return self.month_stats_production_by_id(year, month, plant.id, inverter.id if inverter is not None else None, retry)

def month_stats_production(self, year: int, month: int, plant_id: int, inverter_id: int | None = None, retry: bool = True) -> list[ProductionStats]:
def month_stats_production_by_id(self, year: int, month: int, plant_id: int, inverter_id: int | None = None, retry: bool = True) -> list[ProductionStats]:
"""
Retrieve month energy production statistics.
Expand All @@ -314,7 +314,7 @@ def month_stats_production(self, year: int, month: int, plant_id: int, inverter_
except LoginError:
if retry:
self.authenticate()
return self.month_stats_production(year, month, plant_id, inverter_id, False)
return self.month_stats_production_by_id(year, month, plant_id, inverter_id, False)
return []

def _populate_MPPT(self, result: dict, inverter: Inverter) -> None:
Expand Down

0 comments on commit 42a6e4b

Please sign in to comment.