From 848252e5d4a5060d086fa7658c8ee488dbbda6ea Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 30 Jun 2026 17:30:38 +0000 Subject: [PATCH] =?UTF-8?q?Drag=20an=20air=20source=20heat=20pump's=20cohe?= =?UTF-8?q?rent=20companions=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 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 4726d6866..0658bbf65 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -468,3 +468,22 @@ def test_air_source_heat_pump_decodes_to_the_default_ashp_code() -> None: assert simulation is not None assert simulation.heating is not None assert simulation.heating.sap_main_heating_code == 211 + + +def test_air_source_heat_pump_drags_its_coherent_companions() -> None: + # A heat pump is unambiguously electric (natural fuel 29) and SAP Table 4a + # category 4, billed on an off-peak (Dual) meter (ยง12 Rule 3 lists heat pumps + # 211-224). The overlay drags these code-derived companions so a system-only + # override is self-coherent on a cert that lodged a different system + # (ADR-0035 / ADR-0041). + + # Act + simulation = main_heating_overlay_for("Air source heat pump", 0) + + # Assert + assert simulation is not None + assert simulation.heating is not None + heating = simulation.heating + assert heating.main_heating_category == 4 + assert heating.main_fuel_type == 29 + assert heating.meter_type == "Dual"