From d6bde062eda53b3288c6d1a531daec0aa16b3047 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Fri, 19 Jun 2026 14:05:14 +0000 Subject: [PATCH] =?UTF-8?q?Resolve=20a=20landlord=20gas-combi=20heating=20?= =?UTF-8?q?override=20to=20its=20SAP=20code=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../main_heating_system_overlay.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/domain/epc/property_overlays/main_heating_system_overlay.py b/domain/epc/property_overlays/main_heating_system_overlay.py index 6b7aca804..630c247a4 100644 --- a/domain/epc/property_overlays/main_heating_system_overlay.py +++ b/domain/epc/property_overlays/main_heating_system_overlay.py @@ -19,10 +19,21 @@ from __future__ import annotations from typing import Optional -from domain.modelling.simulation import EpcSimulation +from domain.modelling.simulation import EpcSimulation, HeatingOverlay + +# Canonical system archetype → representative `sap_main_heating_code` (SAP Table +# 4b boiler rows / Table 4a). Codes map to the modern/condensing variant (A-G +# efficiency deferred): 102 regular condensing, 104 condensing combi, 120 CPSU, +# 404 fan storage heaters, 191 direct-acting electric boiler. +_MAIN_HEATING_CODES: dict[str, int] = { + "Gas boiler, combi": 104, +} def main_heating_overlay_for( main_heating_value: str, building_part: int ) -> Optional[EpcSimulation]: - raise NotImplementedError + code = _MAIN_HEATING_CODES.get(main_heating_value) + if code is None: + return None + return EpcSimulation(heating=HeatingOverlay(sap_main_heating_code=code))