mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Map property_type on full-SAP certs for correct heat-transmission 🟩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
951bee3115
commit
5c0460cee2
2 changed files with 11 additions and 0 deletions
|
|
@ -738,6 +738,13 @@ class EpcPropertyDataMapper:
|
|||
# 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,
|
||||
# gov property_type code → str, mirroring from_rdsap_schema_17_1.
|
||||
# Feeds the calculator's house/flat heat-transmission split.
|
||||
property_type=(
|
||||
str(schema.property_type)
|
||||
if schema.property_type is not None
|
||||
else None
|
||||
),
|
||||
dwelling_type=(
|
||||
schema.dwelling_type
|
||||
if isinstance(schema.dwelling_type, str)
|
||||
|
|
|
|||
|
|
@ -202,6 +202,10 @@ class SapSchema17_1:
|
|||
# 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
|
||||
# gov property_type code (0 house, 1 bungalow, 2 flat, 3 maisonette, 4 park
|
||||
# home). Feeds the calculator's house/flat heat-transmission split; left
|
||||
# absent the dwelling is classified as neither → mis-scored (ADR-0037).
|
||||
property_type: Optional[int] = 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue