reverting electric boiler recs, adding cylinder thermostat rec

This commit is contained in:
Khalim Conn-Kowlessar 2024-07-10 01:29:11 +01:00
parent c112d23c67
commit a43c9e82d3
2 changed files with 75 additions and 4 deletions

View file

@ -1151,6 +1151,25 @@ class Costs:
"labour_days": 1,
}
def cylinder_thermostat(self):
"""
Calculate the cost of installing a cylinder thermostat
"""
# The £200 cost is a rough estimate based on internet research
total_cost = 200
subtotal_before_vat = total_cost / (1 + self.VAT_RATE)
vat = total_cost - subtotal_before_vat
# We estimate the labour hours to be 2
return {
"total": total_cost,
"subtotal": subtotal_before_vat,
"vat": vat,
"labour_hours": 2,
"labour_days": 1,
}
def hot_water_tank_insulation(self):
"""
Calculate the cost of installing hot water tank insulation

View file

@ -1,6 +1,7 @@
from backend.Property import Property
from recommendations.Costs import Costs
from recommendations.recommendation_utils import override_costs
from recommendations.recommendation_utils import override_costs, check_simulation_difference
from etl.epc_clean.epc_attributes.HotWaterAttributes import HotWaterAttributes
class HotwaterRecommendations:
@ -34,10 +35,15 @@ class HotwaterRecommendations:
self.recommend_tank_insulation(phase=phase)
return
if self.property.hotwater["clean_description"] == "From main system, no cylinder thermostat":
self.recommend_cylinder_thermostat(phase=phase)
return
def recommend_tank_insulation(self, phase):
"""
If the home has a very poor hot water system, this is often indicative of a lack of insulation on the hot water
tank. This is a very simple and cost effective improvement that can be made to the home.
tank. This is a very simple and cost effective improvement that can be made to the home. It will likely
take the efficiency from very poor to poor.
"""
recommendation_cost = self.costs.hot_water_tank_insulation()
@ -62,9 +68,55 @@ class HotwaterRecommendations:
"sap_points": None,
"already_installed": already_installed,
**recommendation_cost,
"simulation_config": {"hot_water_energy_eff_ending": "Average"},
"simulation_config": {"hot_water_energy_eff_ending": "Poor"},
"description_simulation": {
"hot-water-energy-eff": "Average"
"hot-water-energy-eff": "Poor"
}
}
)
return
def recommend_cylinder_thermostat(self, phase):
"""
If the home has a very poor hot water system, this is often indicative of a lack of insulation on the hot water
tank. This is a very simple and cost effective improvement that can be made to the home.
"""
recommendation_cost = self.costs.cylinder_thermostat()
already_installed = "cylinder_thermostat" in self.property.already_installed
if already_installed:
recommendation_cost = override_costs(recommendation_cost)
description = "Cylinder thermostat has already been installed, no further action required"
else:
description = "Install cylinder thermostat"
new_epc_description = "From main system"
hotwater_ending_config = HotWaterAttributes(new_epc_description).process()
hotwater_simulation_config = check_simulation_difference(
new_config=hotwater_ending_config, old_config=self.property.hotwater
)
simulation_config = {
"hot_water_energy_eff_ending": self.property.data["hot-water-energy-eff"],
**hotwater_simulation_config
}
self.recommendations.append(
{
"phase": phase,
"parts": [],
"type": "cylinder_thermostat",
"description": description,
"starting_u_value": None,
"new_u_value": None,
"sap_points": None,
"already_installed": already_installed,
**recommendation_cost,
"simulation_config": simulation_config,
"description_simulation": {
"hot-water-energy-eff": self.property.data["hot-water-energy-eff"],
"hotwater-description": new_epc_description,
}
}
)