From 5149400f96cf7c7877c61627211539173b91c680 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 25 Jun 2026 20:40:59 +0000 Subject: [PATCH] =?UTF-8?q?Map=20secondary=5Fheating=20on=20full-SAP=20cer?= =?UTF-8?q?ts=20for=20the=20calculator=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) --- datatypes/epc/domain/mapper.py | 5 +++++ datatypes/epc/schema/sap_schema_17_1.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index ae8682b0e..5f9e72316 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -748,6 +748,11 @@ class EpcPropertyDataMapper: built_form=( str(schema.built_form) if schema.built_form is not None else None ), + secondary_heating=( + EpcPropertyDataMapper._map_energy_element(schema.secondary_heating) + if schema.secondary_heating is not None + else None + ), dwelling_type=( schema.dwelling_type if isinstance(schema.dwelling_type, str) diff --git a/datatypes/epc/schema/sap_schema_17_1.py b/datatypes/epc/schema/sap_schema_17_1.py index 1f7754bb2..8a0b2220d 100644 --- a/datatypes/epc/schema/sap_schema_17_1.py +++ b/datatypes/epc/schema/sap_schema_17_1.py @@ -209,6 +209,10 @@ class SapSchema17_1: # gov built_form code (1 detached … 6 enclosed mid-terrace). Carried for the # property-details panel and exposed-side handling (ADR-0037). built_form: Optional[int] = None + # Lodged secondary heating element (description + ratings); "None" when the + # cert has no secondary. Read by the calculator's cert_to_inputs — dropping + # it under-counts a real secondary heater (ADR-0037). + secondary_heating: Optional[EnergyElement] = None # measured living-room area (m²); the engine consumes it via a back-solved # habitable_rooms_count (Table 27). Optional — 100% present in the corpus. living_area: Optional[Union[int, float]] = None