diff --git a/recommendations/HeatingRecommender.py b/recommendations/HeatingRecommender.py index c7064274..676a4b06 100644 --- a/recommendations/HeatingRecommender.py +++ b/recommendations/HeatingRecommender.py @@ -233,6 +233,8 @@ class HeatingRecommender: :return: """ + recommendation_phase = phase + # We now recommend boiler upgrades, if applicable if self.property.data["mainheat-energy-eff"] in ["Very Poor", "Poor", "Average"]: boiler_size = self.estimate_boiler_size( @@ -252,7 +254,7 @@ class HeatingRecommender: self.recommendations.append( { - "phase": phase, + "phase": recommendation_phase, "parts": [ # TODO ], @@ -261,16 +263,21 @@ class HeatingRecommender: "starting_u_value": None, "new_u_value": None, "sap_points": None, + "simulation_config": {"mainheat_energy_eff_ending": "Good"}, **self.costs.low_carbon_boiler(is_combi=is_combi, size=f"{boiler_size}kw") } ) + # We increment the recommendation phase, in the case of us having heating control recommendations + recommendation_phase += 1 + # We recommend the heating controls controls_recommender = HeatingControlRecommender(self.property) controls_recommender.recommend(heating_description="Boiler and radiators, mains gas") # We may have 2 recommendations from the heating controls - # The heating controls recommendation is distrinct from the boiler upgrade recommendation - # We insert phase into the recommendations for heating controls - for recommendation in controls_recommender.recommendation: - recommendation["phase"] = phase + if controls_recommender.recommendation: + # The heating controls recommendation is distrinct from the boiler upgrade recommendation + # We insert phase into the recommendations for heating controls + for recommendation in controls_recommender.recommendation: + recommendation["phase"] = recommendation_phase