diff --git a/domain/modelling/generators/heating_recommendation.py b/domain/modelling/generators/heating_recommendation.py index 9eae0353e..d9564f069 100644 --- a/domain/modelling/generators/heating_recommendation.py +++ b/domain/modelling/generators/heating_recommendation.py @@ -714,14 +714,15 @@ def _hhr_storage_option( def _hhr_storage_eligible(epc: EpcPropertyData) -> bool: - """HHR storage suits an electrically-heated or off-gas dwelling, unless it is - already HHR or a heat pump (translated from legacy `HeatingRecommender. - is_high_heat_retention_valid`, which keyed on description strings).""" + """HHR storage suits a non-gas-fuel dwelling, unless it is already HHR or a + heat pump. Eligibility keys on the heating *fuel* (main_fuel_type not in + _GAS_FUEL_CODES), not the gas-connection flag — a dwelling on a gas street + with electric or oil heating has gas_connection_available=True but still + qualifies.""" main: MainHeatingDetail = epc.sap_heating.main_heating_details[0] if main.sap_main_heating_code == _HHR_STORAGE_SAP_CODE: return False if main.main_heating_category == _HEAT_PUMP_CATEGORY: return False - off_gas: bool = not epc.sap_energy_source.mains_gas - electric_main: bool = main.main_fuel_type == _ELECTRICITY_FUEL - return electric_main or off_gas + non_gas_fuel: bool = main.main_fuel_type not in _GAS_FUEL_CODES + return non_gas_fuel