Map main_heating_controls on full-SAP certs for the FE panel 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-25 21:38:50 +00:00
parent 0440de4965
commit 5deea0a27c
2 changed files with 9 additions and 0 deletions

View file

@ -817,6 +817,14 @@ class EpcPropertyDataMapper:
main_heating=EpcPropertyDataMapper._map_energy_elements(
schema.main_heating
),
# First control system if multiple — mirrors from_rdsap_schema_21_0_1.
main_heating_controls=(
EpcPropertyDataMapper._map_energy_element(
schema.main_heating_controls[0]
)
if schema.main_heating_controls
else None
),
window=(
EpcPropertyDataMapper._map_energy_element(schema.windows)
if schema.windows is not None

View file

@ -220,6 +220,7 @@ class SapSchema17_1:
# reads. Dropped by the WIP mapper → all "Unknown" on the FE (ADR-0037).
# Full-SAP lodges windows under the plural key (a single element, not a list).
main_heating: List[EnergyElement] = field(default_factory=list)
main_heating_controls: List[EnergyElement] = field(default_factory=list)
windows: Optional[EnergyElement] = None
lighting: Optional[EnergyElement] = None
hot_water: Optional[EnergyElement] = None