diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index bb21b8974..24ee6d65e 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -734,6 +734,10 @@ class EpcPropertyDataMapper: door_count, insulated_door_u = _sap_door_aggregates(schema) return EpcPropertyData( uprn=schema.uprn, + # SAP 2012 (~9.92) for this family — carried so CalculatorRebaseliner + # fires trigger (a) (sap_version < 10.2 → Effective = the SAP-10.2 + # calc) instead of keeping the lodged SAP-2012 score (ADR-0037). + sap_version=schema.sap_version, 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 03d79f2fa..cbd58d72a 100644 --- a/datatypes/epc/schema/sap_schema_17_1.py +++ b/datatypes/epc/schema/sap_schema_17_1.py @@ -198,6 +198,10 @@ class SapSchema17_1: sap_heating: SapHeating sap_energy_source: SapEnergySource = field(default_factory=SapEnergySource) sap_ventilation: SapVentilation = field(default_factory=SapVentilation) + # SAP spec the cert was lodged under (~9.92 = SAP 2012 for this family). + # Drives Rebaselining trigger (a): sap_version < 10.2 → Effective = the + # SAP-10.2 calc, not the lodged figure (ADR-0037). Optional defensively. + sap_version: Optional[float] = 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