From 2fab2ad82ecff09101a7c421bccb6b467f0419ee Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 30 Jun 2026 20:15:38 +0000 Subject: [PATCH] =?UTF-8?q?Recognise=20community=20CHP=20and=20boilers=20a?= =?UTF-8?q?s=20a=20heat-network=20system=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../epc/test_main_heating_system_overlay.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 7f2ebc271..d98d01458 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -524,6 +524,23 @@ def test_community_boilers_drag_heat_network_category_and_a_community_gas_fuel() assert heating.main_fuel_type == 20 +def test_community_chp_and_boilers_decode_to_their_heat_network_code() -> None: + # A community scheme with CHP + boilers is SAP Table 4a code 302, still a heat + # network (category 6) on community mains gas (20). Real audit data: 10 + # properties carry this, today mis-bucketed to Gas CPSU (ADR-0041). + + # Act + simulation = main_heating_overlay_for("Community heating, CHP and boilers", 0) + + # Assert + assert simulation is not None + assert simulation.heating is not None + heating = simulation.heating + assert heating.sap_main_heating_code == 302 + assert heating.main_heating_category == 6 + assert heating.main_fuel_type == 20 + + def test_oil_room_heater_decodes_to_the_post_2000_code() -> None: # A modern standalone oil room heater is SAP Table 4a code 623 ("Oil room # heater, 2000 or later", no boiler). It must decode to 623, not the Gas CPSU