mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Debugging solar api for missing panel config
This commit is contained in:
parent
01c688da23
commit
9436bfe7d6
1 changed files with 19 additions and 1 deletions
|
|
@ -309,7 +309,7 @@ class GoogleSolarApi:
|
|||
}
|
||||
)
|
||||
|
||||
panel_performance = pd.DataFrame(panel_performance)
|
||||
panel_performance = pd.DataFrame([panel_performance])
|
||||
|
||||
if panel_performance.empty:
|
||||
self.panel_performance = pd.DataFrame(
|
||||
|
|
@ -329,12 +329,30 @@ class GoogleSolarApi:
|
|||
return
|
||||
|
||||
# We can have duplicate configurations
|
||||
|
||||
panel_performance = panel_performance.drop_duplicates()
|
||||
# If we look at the building level, we don't include any projects fewer than 10 panels, otherwise the
|
||||
# minimum is 4
|
||||
min_panels = 10 if is_building else 4
|
||||
panel_performance = panel_performance[panel_performance["n_panels"] >= min_panels]
|
||||
|
||||
if panel_performance.empty:
|
||||
self.panel_performance = pd.DataFrame(
|
||||
columns=[
|
||||
"n_panels",
|
||||
"yearly_dc_energy",
|
||||
"total_cost",
|
||||
"panneled_roof_area",
|
||||
"array_wattage",
|
||||
"initial_ac_kwh_per_year",
|
||||
"lifetime_ac_kwh",
|
||||
"roi",
|
||||
"expected_payback_years",
|
||||
"lifetime_dc_kwh"
|
||||
]
|
||||
)
|
||||
return
|
||||
|
||||
panel_performance["initial_ac_kwh_per_year"] = panel_performance["yearly_dc_energy"] * self.dc_to_ac_rate
|
||||
|
||||
# Remove anything where the total ac energy is less than half of the array wattage
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue