This commit is contained in:
Khalim Conn-Kowlessar 2026-04-09 20:51:04 +01:00
parent 2fb14858eb
commit 025b18a29c
7 changed files with 25 additions and 3 deletions

View file

@ -724,6 +724,10 @@ async def model_engine(body: PlanTriggerRequest):
# 1) EPC expired 2) Missing EPC 3) Different information from landlord vs EPC # 1) EPC expired 2) Missing EPC 3) Different information from landlord vs EPC
needs_rebaselining = p.epc_is_expired | p.epc_is_estimated | (len(p.epc_record.landlord_differences) > 0) needs_rebaselining = p.epc_is_expired | p.epc_is_estimated | (len(p.epc_record.landlord_differences) > 0)
# Hack - skip
if "SAP05" in p.epc_record.walls_description:
continue
if needs_rebaselining: if needs_rebaselining:
p.create_base_difference_epc_record(cleaned_lookup=cleaned) p.create_base_difference_epc_record(cleaned_lookup=cleaned)
scoring_data = p.base_difference_record.df.copy() scoring_data = p.base_difference_record.df.copy()

View file

@ -778,6 +778,12 @@ class RetrieveFindMyEpc:
'Air or ground source heat pump': ["air_source_heat_pump"], 'Air or ground source heat pump': ["air_source_heat_pump"],
"Add PV Battery": ["solar_pv_battery"], "Add PV Battery": ["solar_pv_battery"],
"Add PV diverter": ["solar_pv_diverter"], # Don't have a recommendation yet "Add PV diverter": ["solar_pv_diverter"], # Don't have a recommendation yet
"Draughtproof single-glazed windows": ["double_glazing"],
"Upgrade heating controls": ["roomstat_programmer_trvs", "time_temperature_zone_control"],
"Low energy lighting recommendation": ["low_energy_lighting"],
"Install cavity wall insulation": ["cavity_wall_insulation"],
"Install solar water heating": ["solar_water_heating"],
'Install photovoltaics, 25% of roof area': ["solar_pv"],
} }
survey = True survey = True

View file

@ -140,6 +140,9 @@ class HeatingRecommender:
# All heat systems are in here so we identify whether two of these are true # All heat systems are in here so we identify whether two of these are true
# MainHeatAttributes.HEAT_SYSTEMS # MainHeatAttributes.HEAT_SYSTEMS
if "sap05" in self.property.main_heating["clean_description"].lower():
return False
n_trues = 0 n_trues = 0
for heat_system in MainHeatAttributes.HEAT_SYSTEMS: for heat_system in MainHeatAttributes.HEAT_SYSTEMS:
if self.property.main_heating[f"has_{heat_system.replace(' ', '_')}"]: if self.property.main_heating[f"has_{heat_system.replace(' ', '_')}"]:
@ -318,6 +321,9 @@ class HeatingRecommender:
:param measures: A list of measures for the recommendations :param measures: A list of measures for the recommendations
""" """
if "sap05" in self.property.main_heating["clean_description"].lower():
return
measures = MEASURE_MAP["heating"] if measures is None else measures measures = MEASURE_MAP["heating"] if measures is None else measures
# if we have a non-invasive ashp recommendation, we get the configuration directly from the property instance # if we have a non-invasive ashp recommendation, we get the configuration directly from the property instance

View file

@ -100,6 +100,9 @@ class LightingRecommendations:
:return: :return:
""" """
if "sap05" in self.property.lighting["clean_description"].lower():
return
if self.property.lighting["low_energy_proportion"] >= 1: if self.property.lighting["low_energy_proportion"] >= 1:
return return

View file

@ -18,7 +18,9 @@ class SecondaryHeating:
def recommend(self, phase: int): def recommend(self, phase: int):
# Reset # Reset
self.recommendation = [] self.recommendation = []
if self.property.epc_record.secondheat_description in ["None", None]: if self.property.epc_record.secondheat_description in ["None", None] or (
"sap05" in self.property.epc_record.secondheat_description.lower()
):
# No secondary heating system, so no recommendation to remove it # No secondary heating system, so no recommendation to remove it
return return

View file

@ -169,7 +169,7 @@ class WallRecommendations(Definitions):
if ( if (
(insulation_thickness in ["average", "above average"]) (insulation_thickness in ["average", "above average"])
or self.property.walls["is_filled_cavity"] or self.property.walls["is_filled_cavity"]
or self.property.walls["clean_description"] is None or self.property.walls["clean_description"] in [None, "Sap05:walls"]
) and ("cavity_extract_and_refill" not in measures ) and ("cavity_extract_and_refill" not in measures
): ):
return return

View file

@ -45,7 +45,8 @@ class WindowsRecommendations:
measures = MEASURE_MAP["windows"] if measures is None else measures measures = MEASURE_MAP["windows"] if measures is None else measures
# If we have no windows recs, leave # If we have no windows recs, leave
if not any(x in measures for x in MEASURE_MAP["windows"]): if not any(x in measures for x in MEASURE_MAP["windows"]) or "sap05" in self.property.windows[
"clean_description"].lower():
return return
if self.property.windows["glazing_type"] in ["triple", "high performance"]: if self.property.windows["glazing_type"] in ["triple", "high performance"]: