diff --git a/recommendations/HeatingRecommender.py b/recommendations/HeatingRecommender.py index 901add15..5f632567 100644 --- a/recommendations/HeatingRecommender.py +++ b/recommendations/HeatingRecommender.py @@ -23,6 +23,8 @@ class HeatingRecommender: # These are descriptions for boilers that are not gas boilers NON_GAS_BOILERS = [ "Boiler and radiators, oil", + "Boiler and radiators, lpg", + "Boiler and radiators, electric" ] def __init__(self, property_instance: Property): @@ -40,8 +42,13 @@ class HeatingRecommender: :return: """ + # We can also recommend hhr if the property doesn't have a mains has connection + no_mains = not self.property.data["mains-gas-flag"] + + hhr_suitable = no_mains or self.has_electric_heating_description + return ( - self.has_electric_heating_description and (not ashp_only_heating_recommendation) and + hhr_suitable and (not ashp_only_heating_recommendation) and ("high_heat_retention_storage_heater" in measures) ) diff --git a/recommendations/tests/test_data/heating_recommendations_data.py b/recommendations/tests/test_data/heating_recommendations_data.py index 5b2b4aa0..bebbfec9 100644 --- a/recommendations/tests/test_data/heating_recommendations_data.py +++ b/recommendations/tests/test_data/heating_recommendations_data.py @@ -677,6 +677,106 @@ testing_examples = [ "heating_controls_recommendation_descriptions": [], "notes": "This property already has storage heaters with manual charge control. The home is mid terrace so" "the ashp is not suitable" + }, + { + "epc": { + 'lmk-key': '206883665252008121709314507989954', 'address1': '2 Upper Gardens Hazelhurst', + 'address2': 'Bishopswood', 'address3': None, 'postcode': 'HR9 5QX', 'building-reference-number': 9443575568, + 'current-energy-rating': 'F', 'potential-energy-rating': 'E', 'current-energy-efficiency': 32, + 'potential-energy-efficiency': 42, 'property-type': 'Bungalow', 'built-form': 'Semi-Detached', + 'inspection-date': '2008-12-11', 'local-authority': 'E06000019', 'constituency': 'E14000743', + 'county': None, + 'lodgement-date': '2008-12-17', 'transaction-type': 'rental (private)', 'environment-impact-current': 54, + 'environment-impact-potential': 64, 'energy-consumption-current': 290, 'energy-consumption-potential': 231, + 'co2-emissions-current': 3.7, 'co2-emiss-curr-per-floor-area': 58, 'co2-emissions-potential': 2.9, + 'lighting-cost-current': 39, 'lighting-cost-potential': 39, 'heating-cost-current': 654, + 'heating-cost-potential': 515, 'hot-water-cost-current': 204, 'hot-water-cost-potential': 169, + 'total-floor-area': 63.94, 'energy-tariff': 'dual', 'mains-gas-flag': 'N', 'floor-level': 'NO DATA!', + 'flat-top-storey': None, 'flat-storey-count': None, 'main-heating-controls': 2106.0, + 'multi-glaze-proportion': 100.0, 'glazed-type': 'double glazing installed before 2002', + 'glazed-area': 'Normal', 'extension-count': 0, 'number-habitable-rooms': 3, 'number-heated-rooms': 3, + 'low-energy-lighting': 75, 'number-open-fireplaces': 0, 'hotwater-description': 'From main system', + 'hot-water-energy-eff': 'Poor', 'hot-water-env-eff': 'Average', + 'floor-description': 'Solid, no insulation (assumed)', 'floor-energy-eff': None, + 'windows-description': 'Fully double glazed', 'windows-energy-eff': 'Average', 'windows-env-eff': 'Average', + 'walls-description': 'Cavity wall, as built, insulated (assumed)', 'walls-energy-eff': 'Good', + 'walls-env-eff': 'Good', 'secondheat-description': 'Room heaters, electric', + 'roof-description': 'Pitched, 100 mm loft insulation', 'roof-energy-eff': 'Average', + 'roof-env-eff': 'Average', 'mainheat-description': 'Boiler and radiators, LPG', + 'mainheat-energy-eff': 'Poor', 'mainheat-env-eff': 'Average', + 'mainheatcont-description': 'Programmer, room thermostat and TRVs', 'mainheatc-energy-eff': 'Average', + 'mainheatc-env-eff': 'Average', 'lighting-description': 'Low energy lighting in 75% of fixed outlets', + 'lighting-energy-eff': 'Very Good', 'lighting-env-eff': 'Very Good', + 'main-fuel': 'LPG - this is for backwards compatibility only and should not be used', + 'wind-turbine-count': 0, 'heat-loss-corridor': 'NO DATA!', 'unheated-corridor-length': None, + 'floor-height': 2.4, 'photo-supply': 0.0, 'solar-water-heating-flag': 'N', + 'mechanical-ventilation': 'natural', 'address': '2 Upper Gardens Hazelhurst, Bishopswood', + 'local-authority-label': 'Herefordshire, County of', + 'constituency-label': 'Hereford and South Herefordshire', 'posttown': 'ROSS-ON-WYE', + 'construction-age-band': 'England and Wales: 1983-1990', + 'lodgement-datetime': '2008-12-17 09:31:45', 'tenure': 'rental (private)', + 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10009573249, + 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None + }, + "heating_recommendation_descriptions": [ + '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 property has an LFG boiler but it doesn't have a mains gas connection so we can only recommend" + "an air source heat pump and hhr storage" + }, + { + "epc": { + 'lmk-key': '749e6ae968c0d5c6491ee1ee82a591733568c981e08ffde7e92b6e4172f3fb0f', + 'address1': '10 Small Holdings', 'address2': 'Stoneleigh Road', 'address3': 'Baginton', + 'postcode': 'CV8 3BA', 'building-reference-number': 10005704940, 'current-energy-rating': 'G', + 'potential-energy-rating': 'E', 'current-energy-efficiency': 12, 'potential-energy-efficiency': 46, + 'property-type': 'House', 'built-form': 'Semi-Detached', 'inspection-date': '2024-03-04', + 'local-authority': 'E07000222', 'constituency': 'E14000767', 'county': 'Warwickshire', + 'lodgement-date': '2024-03-08', 'transaction-type': 'not sale or rental', 'environment-impact-current': 14, + 'environment-impact-potential': 39, 'energy-consumption-current': 728, 'energy-consumption-potential': 379, + 'co2-emissions-current': 11.0, 'co2-emiss-curr-per-floor-area': 137, 'co2-emissions-potential': 5.9, + 'lighting-cost-current': 169, 'lighting-cost-potential': 169, 'heating-cost-current': 4435, + 'heating-cost-potential': 2718, 'hot-water-cost-current': 405, 'hot-water-cost-potential': 227, + 'total-floor-area': 81.0, 'energy-tariff': 'dual', 'mains-gas-flag': 'N', 'floor-level': None, + 'flat-top-storey': None, 'flat-storey-count': None, 'main-heating-controls': None, + 'multi-glaze-proportion': 100.0, 'glazed-type': 'not defined', 'glazed-area': 'Much More Than Typical', + 'extension-count': 0, 'number-habitable-rooms': 4, 'number-heated-rooms': 4, 'low-energy-lighting': 63, + 'number-open-fireplaces': 1, 'hotwater-description': 'From main system', 'hot-water-energy-eff': 'Poor', + 'hot-water-env-eff': 'Poor', 'floor-description': 'Solid, no insulation (assumed)', + 'floor-energy-eff': None, + 'windows-description': 'Fully double glazed', 'windows-energy-eff': 'Average', 'windows-env-eff': 'Average', + 'walls-description': 'Solid brick, as built, no insulation (assumed)', 'walls-energy-eff': 'Very Poor', + 'walls-env-eff': 'Very Poor', 'secondheat-description': 'Room heaters, smokeless fuel', + 'roof-description': 'Pitched, no insulation (assumed)', 'roof-energy-eff': 'Very Poor', + 'roof-env-eff': 'Very Poor', 'mainheat-description': 'Boiler and radiators, electric', + 'mainheat-energy-eff': 'Very Poor', 'mainheat-env-eff': 'Poor', + 'mainheatcont-description': 'Programmer, room thermostat and TRVs', 'mainheatc-energy-eff': 'Good', + 'mainheatc-env-eff': 'Good', 'lighting-description': 'Low energy lighting in 63% of fixed outlets', + 'lighting-energy-eff': 'Good', 'lighting-env-eff': 'Good', 'main-fuel': 'electricity (not community)', + 'wind-turbine-count': 0, 'heat-loss-corridor': None, 'unheated-corridor-length': None, 'floor-height': 2.31, + 'photo-supply': 0.0, 'solar-water-heating-flag': 'N', 'mechanical-ventilation': 'natural', + 'address': '10 Small Holdings, Stoneleigh Road, Baginton', 'local-authority-label': 'Warwick', + 'constituency-label': 'Kenilworth and Southam', 'posttown': 'COVENTRY', + 'construction-age-band': 'England and Wales: 1930-1949', + 'lodgement-datetime': '2024-03-08 10:43:35', 'tenure': 'Rented (social)', + 'fixed-lighting-outlets-count': 8.0, 'low-energy-fixed-light-count': None, 'uprn': 10013181470, + 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None + }, + "heating_recommendation_descriptions": [ + '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 property has electric boilers in place, but does not have a mains connection so we don't " + "recommend a boiler upgrade. We recommend HHR and ASHP" } ] @@ -728,6 +828,8 @@ completed_descriptions = [ "Room heaters, mains gas", "No system present: electric heaters assumed", "Room heaters, electric", + "Electric storage heaters", + "Boiler and radiators, LPG", ] portfolio = pd.read_excel( @@ -738,6 +840,6 @@ portfolio = portfolio[~portfolio["mainheat-description"].isin(completed_descript portfolio["mainheat-description"].value_counts() eg = portfolio[ - (portfolio["mainheat-description"] == "Electric storage heaters") + (portfolio["mainheat-description"] == "Boiler and radiators, electric") ].sample(1) eg = eg.squeeze().to_dict()