From e83c420f3bb6835de983fe9c659bad6308ea9b56 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 1 Jul 2026 15:42:25 +0000 Subject: [PATCH] =?UTF-8?q?Resolve=20an=20electric-boiler=20override=20to?= =?UTF-8?q?=20SAP=20191=20dragging=20electricity=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) --- .../domain/epc/test_main_heating_system_overlay.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 4421fefe1..af8af3bce 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -101,6 +101,19 @@ def test_solid_fuel_room_heaters_decode_off_gas_cpsu( assert simulation.heating.sap_main_heating_code == code +def test_electric_boiler_decodes_to_191_and_drags_electricity() -> None: + # An "A rated NA" boiler (all-electric per its main_fuel override) was funnelled + # into Gas CPSU (120, mains gas). It is a direct-acting electric boiler (SAP 191) + # and unambiguously electric, so the archetype drags electricity (29) — never + # leaving a mains-gas fuel to bleed through (ADR-0045). + simulation = main_heating_overlay_for("Electric boiler", 0) + + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.sap_main_heating_code == 191 + assert simulation.heating.main_fuel_type == 29 + + @pytest.mark.parametrize( ("main_heating_value", "code"), [