Skip to content

Commit

Permalink
fix: parsePower receives settings not the power
Browse files Browse the repository at this point in the history
  • Loading branch information
vokimon committed Jun 15, 2022
1 parent d4547b0 commit 3a2f6b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions heman/api/pvcalculator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def get(self, contract):
for i,scenario in enumerate(scenarios)
if parseTilt(scenario['settings']) == tiltDegrees
and parseMongoAzimuthFromSettings(scenario['settings']) == azimuthDegrees
and (parsePower(scenario['settings']) == peakPowerKw or not peakPowerKw)
and (not peakPowerKw or parsePower(scenario['settings']) == peakPowerKw)
]
if not selectedScenarios:
return dict(
Expand Down Expand Up @@ -137,7 +137,7 @@ def get(self, contract):
tiltDegrees= parseTilt(bestScenario['settings']),
areaM2 = bestScenario['settings']['area'],
nModules = bestScenario['settings']['numModules'],
peakPowerKw = parsePower(bestScenario['settings']['power']),
peakPowerKw = parsePower(bestScenario['settings']),
dailyLoadProfileKwh = timeSerie(scenario_report['results']['pvAutoSize']['load']['profile']),
dailyProductionProfileKwh = timeSerie(bestScenario['generation']['profile']),
monthlyProductionToLoadKwh = timeSerie(bestScenario['generation']['monthlyPVtoLoad']),
Expand Down

0 comments on commit 3a2f6b4

Please sign in to comment.