diff --git a/backend/Funding.py b/backend/Funding.py index 027a9a2e..301be1ae 100644 --- a/backend/Funding.py +++ b/backend/Funding.py @@ -432,7 +432,7 @@ class Funding: # Handle the case of no heating system - electric heaters assumed if mainheating["has_no_system_present"] or mainheating["has_portable_electric_heaters"] or ( mainheating["has_warm_air"] and mainheating["has_electric"] and not mainheating["has_electricaire"] - ): + ) or mainheating['has_hot-water-only']: return 'Electric Room Heaters' if not any(mainheating.values()): diff --git a/backend/tests/test_data/pre_heating_scenarios.py b/backend/tests/test_data/pre_heating_scenarios.py index ab5dcbb1..acf88113 100644 --- a/backend/tests/test_data/pre_heating_scenarios.py +++ b/backend/tests/test_data/pre_heating_scenarios.py @@ -96,7 +96,7 @@ pre_main_heating_scenarios = [ { "description": "Portable electric heaters assumed for most rooms (maps to electric room heaters)", "MAINHEAT_DESCRIPTION": "Portable electric heaters assumed for most rooms", - "MAIN_FUEL": "mains gas (not community)", # weird in EPCs, but your mapper forces electric room heaters here + "MAIN_FUEL": "mains gas (not community)", # weird in EPCs, mapper forces electric room heaters here "MAINHEAT_ENERGY_EFF": "Very Poor", "expected": "Electric Room Heaters", }, diff --git a/backend/tests/test_funding.py b/backend/tests/test_funding.py index 456c090e..5f6eaa32 100644 --- a/backend/tests/test_funding.py +++ b/backend/tests/test_funding.py @@ -1126,7 +1126,7 @@ for _, x in tqdm(epc_df.iterrows(), total=len(epc_df)): errored_epcs = epc_df[epc_df["LMK_KEY"].isin(errors)] unique_combs = errored_epcs[["MAINHEAT_ENERGY_EFF", "MAINHEAT_DESCRIPTION", "MAIN_FUEL"]].drop_duplicates() -i = 11 +i = 2 x = errored_epcs[ (errored_epcs["MAINHEAT_ENERGY_EFF"] == unique_combs["MAINHEAT_ENERGY_EFF"].values[i]) & (errored_epcs["MAINHEAT_DESCRIPTION"] == unique_combs["MAINHEAT_DESCRIPTION"].values[i]) & diff --git a/etl/epc_clean/epc_attributes/MainheatAttributes.py b/etl/epc_clean/epc_attributes/MainheatAttributes.py index 7d59cd4c..1dcaa549 100644 --- a/etl/epc_clean/epc_attributes/MainheatAttributes.py +++ b/etl/epc_clean/epc_attributes/MainheatAttributes.py @@ -16,6 +16,7 @@ class MainHeatAttributes(Definitions): "solar assisted heat pump", "exhaust source heat pump", "community heat pump", + "hot-water-only" ] FUEL_TYPES = ["electric", "mains gas", "wood logs", "coal", "oil", "wood pellets", "anthracite", "dual fuel mineral and wood", "smokeless fuel", "lpg", "b30k", "mineral and wood", @@ -88,6 +89,7 @@ class MainHeatAttributes(Definitions): "gas-fired heat pumps, electric": "air source heat pump, electric", "radiator heating, heat from boilers - gas": "boiler and radiators, mains gas", "heat pump, warm air, mains gas": "air source heat pump, warm air, mains gas", + "air sourceheat pump, radiators, electric": "air source heat pump, radiators, electric" } edge_case_result = {} diff --git a/etl/epc_clean/tests/test_data/test_mainheat_attributes_cases.py b/etl/epc_clean/tests/test_data/test_mainheat_attributes_cases.py index cc95fa23..64478b5f 100644 --- a/etl/epc_clean/tests/test_data/test_mainheat_attributes_cases.py +++ b/etl/epc_clean/tests/test_data/test_mainheat_attributes_cases.py @@ -1738,5 +1738,21 @@ mainheat_cases = [ 'has_mineral_and_wood': False, 'has_dual_fuel_appliance': True, 'has_assumed': False, 'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False + }, + { + "original_description": "Hot-Water-Only Systems, electric", + 'has_radiators': False, 'has_fan_coil_units': False, 'has_pipes_in_screed_above_insulation': False, + 'has_pipes_in_insulated_timber_floor': False, 'has_pipes_in_concrete_slab': False, 'has_boiler': False, + 'has_air_source_heat_pump': False, 'has_room_heaters': False, 'has_electric_storage_heaters': False, + 'has_warm_air': False, 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False, + 'has_community_scheme': False, 'has_ground_source_heat_pump': False, 'has_no_system_present': False, + 'has_portable_electric_heaters': False, 'has_water_source_heat_pump': False, 'has_electric_heat_pump': False, + 'has_micro-cogeneration': False, 'has_solar_assisted_heat_pump': False, 'has_exhaust_source_heat_pump': False, + 'has_community_heat_pump': False, 'has_hot-water-only': True, 'has_electric': True, 'has_mains_gas': False, + 'has_wood_logs': False, 'has_coal': False, 'has_oil': False, 'has_wood_pellets': False, 'has_anthracite': False, + 'has_dual_fuel_mineral_and_wood': False, 'has_smokeless_fuel': False, 'has_lpg': False, 'has_b30k': False, + 'has_mineral_and_wood': False, 'has_dual_fuel_appliance': False, 'has_assumed': False, + 'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False + } ]