Electric boiler and CPSU overrides drag the conservative Group 1 control (2101) 🟥

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-03 14:07:22 +00:00
parent 82cb567a1d
commit afa781719d

View file

@ -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"]
)