From 94a5e79067b8603b5c799d0df964198ef04c6a57 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 1 Jul 2026 16:08:42 +0000 Subject: [PATCH] =?UTF-8?q?Resolve=20an=20electric-CPSU=20override=20to=20?= =?UTF-8?q?SAP=20192=20electric=20on=20an=20off-peak=20meter=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 (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 af8af3bce..4b4558718 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -114,6 +114,19 @@ def test_electric_boiler_decodes_to_191_and_drags_electricity() -> None: assert simulation.heating.main_fuel_type == 29 +def test_electric_cpsu_decodes_to_192_electric_on_an_off_peak_meter() -> None: + # An electric "Boiler: A rated CPSU" was funnelled into mains-gas Gas CPSU + # (120). Electric CPSU is SAP Table 4a 192, electric (29), charging overnight on + # a Dual off-peak meter (§12 Rule 1, 10-hour) — ADR-0045. + simulation = main_heating_overlay_for("Electric CPSU", 0) + + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.sap_main_heating_code == 192 + assert simulation.heating.main_fuel_type == 29 + assert simulation.heating.meter_type == "Dual" + + @pytest.mark.parametrize( ("main_heating_value", "code"), [