From 9f17a277662cdb0cbdb279953ecc5159963f8cd3 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Sat, 6 Jun 2026 17:18:58 +0000 Subject: [PATCH] feat(modelling): ASHP overlay resets water_heating_code to the HP end-state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ASHP bundle is a fixed whole-system end-state (confirmed: always the same contractor cylinder), so the hot-water arrangement is fixed too. The overlay now sets water_heating_code=901 ("from main system") absolutely, so a combi (909/611) or electric (903/908) before is reset to HW-from-the-heat-pump — previously the overlay relied on the before already lodging 901 (true for boiler-1, not in general). No-op for the boiler-1 pin (stays 1e-4). Cascade pins for combi / electric-with-cylinder befores await example certs. ADR-0024. Co-Authored-By: Claude Opus 4.8 --- domain/modelling/generators/heating_recommendation.py | 5 +++++ tests/domain/modelling/test_heating_recommendation.py | 1 + 2 files changed, 6 insertions(+) diff --git a/domain/modelling/generators/heating_recommendation.py b/domain/modelling/generators/heating_recommendation.py index d1300338..8e35eebb 100644 --- a/domain/modelling/generators/heating_recommendation.py +++ b/domain/modelling/generators/heating_recommendation.py @@ -66,6 +66,11 @@ _ASHP_OVERLAY = HeatingOverlay( main_heating_control=2210, main_heating_index_number=101413, main_heating_category=_HEAT_PUMP_CATEGORY, + # Hot water from the main heat-pump system via the new cylinder (code 901, + # "from main system"). Set absolutely so a combi (909/611) or electric + # (903/908) before is reset to the fixed HP end-state, not just the case + # where the before already lodged 901. + water_heating_code=901, water_heating_fuel=_ELECTRICITY_FUEL, cylinder_size=4, cylinder_insulation_type=1, diff --git a/tests/domain/modelling/test_heating_recommendation.py b/tests/domain/modelling/test_heating_recommendation.py index 90203d0f..52bf8b48 100644 --- a/tests/domain/modelling/test_heating_recommendation.py +++ b/tests/domain/modelling/test_heating_recommendation.py @@ -154,6 +154,7 @@ def test_gas_boiler_house_yields_an_ashp_bundle() -> None: main_heating_control=2210, main_heating_index_number=101413, main_heating_category=4, + water_heating_code=901, water_heating_fuel=30, cylinder_size=4, cylinder_insulation_type=1,