revert changes

This commit is contained in:
Daniel Roth 2026-07-01 09:52:06 +00:00
parent d4f735e096
commit 266a276dae
2 changed files with 3 additions and 23 deletions

View file

@ -225,8 +225,8 @@ _RADIATOR_ROOM_OFFSET = 3
_RADIATOR_M2_PER_RADIATOR = 13.0
# main_fuel_type codes (gov API enum and/or Table 12) by fuel. Classification
# keys on the heating *fuel*, NOT the `mains_gas` flag — that flag means gas is
# available at the property, which is True for any dwelling on a gas street
# regardless of its actual heating fuel (electric, oil, solid biomass, etc.).
# available at the property, which is True even for electrically-heated dwellings
# on a gas street (every 001431 electric fixture lodges mains_gas=True).
_GAS_FUEL_CODES = frozenset({26, 1})
_OIL_FUEL_CODES = frozenset({28, 4, 71, 73, 75, 76})
_LPG_FUEL_CODES = frozenset({27, 2, 3, 5, 9})
@ -722,6 +722,6 @@ def _hhr_storage_eligible(epc: EpcPropertyData) -> bool:
return False
if main.main_heating_category == _HEAT_PUMP_CATEGORY:
return False
off_gas: bool = main.main_fuel_type not in _GAS_FUEL_CODES
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

View file

@ -119,26 +119,6 @@ def test_existing_heat_pump_dwelling_yields_no_hhr_storage_bundle() -> None:
assert recommend_heating(baseline, _StubProducts()) is None
def test_solid_biomass_dwelling_with_gas_connection_yields_hhr_storage_bundle() -> None:
# Arrange — wood-pellet heating (fuel 29, SAP code 691, category 10) with
# mains_gas=True. The mains_gas flag means gas is available at the street,
# not that the heating fuel is gas (property 742121 regression).
baseline: EpcPropertyData = _electric_storage_baseline()
main = baseline.sap_heating.main_heating_details[0]
main.main_fuel_type = 29 # wood pellets (bagged)
main.sap_main_heating_code = 691 # solid-fuel room heater
main.main_heating_category = 10 # room heaters — not heat pump (category 4)
baseline.sap_energy_source.mains_gas = True # gas available at street
# Act
recommendation: Recommendation | None = recommend_heating(baseline, _StubProducts())
# Assert — HHRSH is offered: off-gas-heated dwelling despite gas connection
assert recommendation is not None
options = {o.measure_type.value: o for o in recommendation.options}
assert "high_heat_retention_storage_heaters" in options
def test_hhr_storage_bundle_carries_the_product_cost_and_contingency() -> None:
# Arrange
baseline: EpcPropertyData = _electric_storage_baseline()