diff --git a/etl/eligibility/Eligibility.py b/etl/eligibility/Eligibility.py index f25d06bd..c4dc9de0 100644 --- a/etl/eligibility/Eligibility.py +++ b/etl/eligibility/Eligibility.py @@ -152,9 +152,14 @@ class Eligibility: is_partial_filled = ( self.walls["is_as_built"] and self.walls["insulation_thickness"] not in ["below average"] ) + # We look for potentially under performing cavities - anything that is assumed, as built and insulated + is_underperforming = ( + self.walls["is_as_built"] and self.walls["insulation_thickness"] in ["average"] and self.walls["is_assumed"] + ) is_unfilled_cavity = is_cavity and is_empty is_partial_filled_cavity = is_cavity and is_partial_filled + is_underperforming_cavity = is_cavity and is_underperforming if is_unfilled_cavity: self.cavity = { @@ -170,6 +175,13 @@ class Eligibility: } return + if is_underperforming_cavity: + self.cavity = { + "suitability": True, + "type": "underperforming" + } + return + self.cavity = { "suitability": False, "type": "full" diff --git a/etl/eligibility/ha_15_32/ha4_app.py b/etl/eligibility/ha_15_32/ha4_app.py index cc64dfad..8b102f6d 100644 --- a/etl/eligibility/ha_15_32/ha4_app.py +++ b/etl/eligibility/ha_15_32/ha4_app.py @@ -124,6 +124,7 @@ def get_ha_4_data(data, cleaned, cleaning_data, created_at): "uprn": epc["uprn"], "Location Name": property_meta["Location Name"], "Post Code": property_meta["Post Code"], + "property_type": eligibility.epc["property-type"], "gbis_eligible": eligibility.gbis_warmfront, "eco4_eligible": eligibility.eco4_warmfront["eligible"], "eco4_message": eligibility.eco4_warmfront["message"], @@ -135,6 +136,7 @@ def get_ha_4_data(data, cleaned, cleaning_data, created_at): # Property components "roof": eligibility.roof["clean_description"], "walls": eligibility.walls["clean_description"], + "cavity_type": eligibility.cavity["type"], "heating": eligibility.epc["mainheat-description"], "tenure": eligibility.tenure, "date_epc": eligibility.epc["lodgement-date"], diff --git a/etl/epc_clean/epc_attributes/MainheatAttributes.py b/etl/epc_clean/epc_attributes/MainheatAttributes.py index e21f0d37..813e15a6 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", + "portable electric heating" ] FUEL_TYPES = ["electric", "mains gas", "wood logs", "coal", "oil", "wood pellets", "anthracite", "dual fuel mineral and wood", "smokeless fuel", "lpg", "b30k"] 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 d264ebff..558b176e 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 @@ -1652,4 +1652,17 @@ mainheat_cases = [ 'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, "has_electric_heat_pumps": False, "has_micro-cogeneration": False}, + {'original_description': 'Portable electric heating assumed for most rooms', '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_portable_electric_heating': 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_assumed': True, 'has_electricaire': False, 'has_assumed_for_most_rooms': True, + 'has_underfloor_heating': False} ]