From afa781719d8a4be2f6d94ae184e487e52b7c21c6 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 3 Jul 2026 14:07:22 +0000 Subject: [PATCH] =?UTF-8?q?Electric=20boiler=20and=20CPSU=20overrides=20dr?= =?UTF-8?q?ag=20the=20conservative=20Group=201=20control=20(2101)=20?= =?UTF-8?q?=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 --- .../epc/test_main_heating_system_overlay.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 45ecc9ecf..07171cfca 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -457,6 +457,31 @@ def test_electric_boiler_overlays_the_boiler_category( assert simulation.heating.main_heating_category == 2 +@pytest.mark.parametrize( + "main_heating_value", + ["Direct-acting electric", "Electric boiler", "Electric CPSU"], +) +def test_electric_boiler_drags_the_conservative_group_1_control( + main_heating_value: str, +) -> None: + # The landlord names the system, not its control, so the overlay assumes + # the conservative Table 4e Group 1 default: 2101 ("no time or thermostatic + # control", +0.6 C — the largest Group 1 adjustment, so an unobserved + # control is never over-credited; the boiler mirror of storage 2401 / + # room-heater 2601 / underfloor 2701). Supersedes the old "direct-acting + # drags no control" pin: an unset control is not "no control" — it INHERITS + # the replaced system's (a community 2306 or storage 2401 rode along on + # portfolio 796). Deliberately NOT the gas boilers' modern 2106 — nothing + # in the electric archetype implies a modern install (ADR-0052). + # Act + simulation = main_heating_overlay_for(main_heating_value, 0) + + # Assert — SAP Table 4e Group 1 conservative boiler control. + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.main_heating_control == 2101 + + @pytest.mark.parametrize( "main_heating_value", ["Gas boiler, combi", "Gas boiler, regular", "Gas CPSU"] )