fixing incorrect descriptions and removing test expecations for homes that shouldn't have an ashp

This commit is contained in:
Khalim Conn-Kowlessar 2024-09-18 10:54:52 +01:00
parent b34f1faca0
commit 335823d3af
2 changed files with 57 additions and 40 deletions

View file

@ -41,6 +41,20 @@ class HeatingRecommender:
"high_heat_retention_storage_heater",
]
}
},
"Portable electric heaters assumed for most rooms, room heaters, electric": {
"hhr": {
"mainheating_description": "Electric storage heaters, radiators",
"recommendation_description": "Install high heat retention electric storage heaters.",
"controls_prefix": ""
},
"boiler": {
"mainheating_description": "Boiler and radiators, mains gas",
"recommendation_description": "Upgrade to a new condensing boiler.",
"controls_suffix": ""
},
# These are the heating types we need to produce a dual heating recommendation
"dual": None
}
}
@ -91,7 +105,7 @@ class HeatingRecommender:
# If the property already has room heaters then we recommend HHR as an option since the home already has
# a variation of room heaters
hhr_suitable = no_mains or self.has_electric_heating_description or self.has_room_heaters
return (
@ -160,6 +174,12 @@ class HeatingRecommender:
if self.property.main_heating["clean_description"] not in self.DUAL_HEATING_DESCRIPTIONS:
return
# if we have set dual to None, we do not produce a dual heating recommendation
if self.DUAL_HEATING_DESCRIPTIONS[
self.property.main_heating["clean_description"]
]["dual"] is None:
return
dual_heating_description = self.DUAL_HEATING_DESCRIPTIONS[
self.property.main_heating["clean_description"]
]["dual"]["types"]
@ -688,10 +708,15 @@ class HeatingRecommender:
# We only recommend Celect-type controls if the current heating system is not Celect-type controls
if self.property.main_heating_controls["clean_description"] != self.high_heat_retention_contols_desc:
if self.dual_heating:
if self.DUAL_HEATING_DESCRIPTIONS[self.property.main_heating["clean_description"]]["hhr"][
"controls_prefix"
] == "current_controls":
controls_prefix = self.DUAL_HEATING_DESCRIPTIONS[
self.property.main_heating["clean_description"]
]["hhr"]["controls_prefix"]
if controls_prefix == "current_controls":
description_prefix = self.property.main_heating_controls["clean_description"]
elif controls_prefix == "":
description_prefix = ""
else:
raise NotImplementedError("Implement me")
else:
@ -735,6 +760,10 @@ class HeatingRecommender:
self.property.number_of_rooms
)
)
# To be conservative, we adjust if we still have 1 room
if (number_heated_rooms == 1) and (self.property.number_of_rooms > 2):
number_heated_rooms = self.property.number_of_rooms - 1
# Upgrade to electric storage heaters
costs = self.costs.high_heat_electric_storage_heaters(
number_heated_rooms=number_heated_rooms
@ -870,7 +899,7 @@ class HeatingRecommender:
self.property.main_heating["clean_description"]
]["boiler"]["recommendation_description"]
else:
description = "Upgrade to a new condensing boiler"
description = "Upgrade to a new condensing boiler."
new_heating_eff = (
"Good" if self.property.data["mainheat-energy-eff"] in ["Very Poor", "Poor", "Average"]

View file

@ -94,7 +94,7 @@ testing_examples = [
'uprn-source': 'Address Matched',
},
"heating_recommendation_descriptions": [
"Install high heat retention electric storage heaters and upgrade heating controls to High Heat Retention "
"Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention "
"Storage Heater Controls"
],
"heating_controls_recommendation_descriptions": [],
@ -198,7 +198,7 @@ testing_examples = [
'uprn': 100021560521.0, 'uprn-source': 'Address Matched',
},
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler'
'Upgrade to a new condensing boiler.'
],
"heating_controls_recommendation_descriptions": [
'Upgrade heating controls to Room thermostat, programmer and TRVs',
@ -251,17 +251,14 @@ testing_examples = [
'uprn': 100021936225.0, 'uprn-source': 'Address Matched',
},
"heating_recommendation_descriptions": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
'scheme grant',
],
"heating_controls_recommendation_descriptions": [
'upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade heating controls to Smart Thermostats, room sensors and smart radiator valves (time & '
'temperature zone control)'
],
"notes": "Because this property already has a boiler, we don't recommend HHR. We only have a "
"heating recommendation for an air source heat pump. Because the heating controls are "
"notes": "Because this property already has a boiler, we don't recommend HHR. We don't recommend an ashp "
"because the home is mid-terraced. Because the heating controls are "
"Programmer, no room thermostat, we have a programmer, room thermostat and trvs recommendation"
"for heating controls and for TTZC."
},
@ -306,7 +303,7 @@ testing_examples = [
'uprn': 43088770.0, 'uprn-source': 'Address Matched',
},
"heating_recommendation_descriptions": [
'Install high heat retention electric storage heaters and upgrade heating controls to High Heat Retention '
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
],
"heating_controls_recommendation_descriptions": [],
@ -408,10 +405,10 @@ testing_examples = [
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
},
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler. upgrade heating controls to Room thermostat, programmer and TRVs',
'Install high heat retention electric storage heaters. upgrade heating controls to High Heat Retention '
'Storage Heater Controls',
'Upgrade to a new condensing boiler upgrade heating controls to Smart Thermostats, room sensors and smart '
'Upgrade to a new condensing boiler. upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)'
],
"heating_controls_recommendation_descriptions": [],
@ -506,8 +503,8 @@ testing_examples = [
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
},
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler Upgrade heating controls to Smart Thermostats, room sensors and smart '
'Upgrade to a new condensing boiler. upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)',
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
@ -557,8 +554,8 @@ testing_examples = [
},
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler Upgrade heating controls to Smart Thermostats, room sensors and smart '
'Upgrade to a new condensing boiler. upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls',
@ -608,22 +605,13 @@ testing_examples = [
'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
},
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)',
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control)'
],
"heating_controls_recommendation_descriptions": [
'Upgrade to a new condensing boiler upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls',
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
'scheme grant'
],
"heating_controls_recommendation_descriptions": [],
"notes": "This has a form of assumed electric heating and has a mains connection so we recommend HHR, boiler"
"upgrade and ASHP"
},
@ -667,8 +655,8 @@ testing_examples = [
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
},
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler Upgrade heating controls to Smart Thermostats, room sensors and smart '
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)',
'Install high heat retention electric storage heaters. The current electric heaters may be retrofit with '
'high heat retention storage controls however this is dependent on the existing system and may not be '
@ -1258,8 +1246,8 @@ testing_examples = [
'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
},
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler Upgrade heating controls to Smart Thermostats, room sensors and smart '
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
@ -1355,8 +1343,8 @@ testing_examples = [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
'scheme grant',
'Upgrade to a new condensing boiler Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler Upgrade heating controls to Smart Thermostats, room sensors and smart '
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
@ -1406,8 +1394,8 @@ testing_examples = [
'sheating-env-eff': None
},
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler Upgrade heating controls to Smart Thermostats, room sensors and smart '
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)'
],
"heating_controls_recommendation_descriptions": [],