From 9835b7115c53f893fab2435daccfecba5738b546 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 1 Jul 2026 10:38:30 +0000 Subject: [PATCH] =?UTF-8?q?On-gas-street=20electric=20dwelling=20(API=20fu?= =?UTF-8?q?el=20code=2029)=20is=20offered=20HHRSH=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../modelling/generators/heating_recommendation.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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