mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-08-09 18:36:11 +00:00
fix PVLib mountingplace None handling (#1220)
Handle an explicit None value for pvforecast.planes[].mountingplace before calling .lower().
This commit is contained in:
@@ -343,7 +343,7 @@ class PVForecastPVLib(PredictionMixin, PVForecastProvider):
|
|||||||
if plane.strings_per_inverter is None:
|
if plane.strings_per_inverter is None:
|
||||||
raise ValueError(f"Plane {plane_idx}: strings_per_inverter must be configured.")
|
raise ValueError(f"Plane {plane_idx}: strings_per_inverter must be configured.")
|
||||||
|
|
||||||
mountingplace = plane.mountingplace.lower()
|
mountingplace = plane.mountingplace.lower() if plane.mountingplace is not None else None
|
||||||
if mountingplace == "building":
|
if mountingplace == "building":
|
||||||
temp_params = TEMPERATURE_MODEL_PARAMETERS["sapm"]["close_mount_glass_glass"]
|
temp_params = TEMPERATURE_MODEL_PARAMETERS["sapm"]["close_mount_glass_glass"]
|
||||||
elif mountingplace == "free" or mountingplace is None:
|
elif mountingplace == "free" or mountingplace is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user