added call to unit solar api call

This commit is contained in:
Khalim Conn-Kowlessar 2024-10-02 11:42:18 +01:00
parent 46f513a4f2
commit 33bc38fdc8

View file

@ -516,8 +516,6 @@ async def trigger_plan(body: PlanTriggerRequest):
# TODO: If a property is semi-detached, we might get roof surfaces for the main building + the neighbour
# TODO: If we can't get high image quality, should we use the solar API? Maybe just for semi-detached units with
# extensions, since it doesn't seem to do a great job
# TODO: For simple properties, we should do a comparison/check between the solar API's roof area and the
# basic estimate of roof area
building_solar_config, unit_solar_config = GoogleSolarApi.prepare_input_data(
input_properties=input_properties,
@ -532,6 +530,14 @@ async def trigger_plan(body: PlanTriggerRequest):
google_solar_api_key=get_settings().GOOGLE_SOLAR_API_KEY
)
input_properties = GoogleSolarApi.unit_solar_analysis(
unit_solar_config=unit_solar_config,
input_properties=input_properties,
session=session,
body=body,
google_solar_api_key=get_settings().GOOGLE_SOLAR_API_KEY
)
logger.info("Identifying property recommendations")
recommendations = {}
recommendations_scoring_data = []