From 950ec31d84a52717b67602bc1aab83b2d142c0f8 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 3 Jul 2026 14:19:52 +0000 Subject: [PATCH] =?UTF-8?q?Community-heating=20overrides=20drag=20the=20co?= =?UTF-8?q?nservative=20Group=203=20control=20(2301)=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 --- .../epc/test_main_heating_system_overlay.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 795a9defe..c092c5114 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -108,6 +108,30 @@ def test_overlay_logs_when_it_cannot_complete_a_companion_set( assert "Community heating, boilers" in caplog.text +@pytest.mark.parametrize( + "main_heating_value", + ["Community heating, boilers", "Community heating, CHP and boilers"], +) +def test_community_heating_drags_the_conservative_group_3_control( + main_heating_value: str, +) -> None: + # The landlord names the scheme, not its control or charging arrangement. + # The conservative Table 4e Group 3 default is 2301 ("flat rate charging, + # no thermostatic control of room temperature"): the largest Group 3 + # temperature adjustment (+0.3 C) AND the worst Table 4c(3) charging + # factors (space 1.10, DHW 1.05) — an unobserved control is never + # over-credited and an unobserved charging arrangement is never assumed + # usage-linked (ADR-0053). Leaving it unset inherits the replaced system's + # control instead (the ADR-0048 bug class). + # Act + simulation = main_heating_overlay_for(main_heating_value, 0) + + # Assert — SAP Table 4e Group 3 conservative heat-network control. + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.main_heating_control == 2301 + + def test_air_source_heat_pump_drags_the_conservative_group_2_control() -> None: # The landlord names the system, not its control, so the overlay assumes # the conservative Table 4e Group 2 default: 2201 ("no time or thermostatic