diff --git a/domain/epc/property_overlays/wall_type_overlay.py b/domain/epc/property_overlays/wall_type_overlay.py index 0620819c..848ced77 100644 --- a/domain/epc/property_overlays/wall_type_overlay.py +++ b/domain/epc/property_overlays/wall_type_overlay.py @@ -31,6 +31,9 @@ _MATERIAL_CONSTRUCTION: dict[str, int] = { "Curtain Wall": 9, } +# RdSAP `WALL_SYSTEM_BUILT` — shares code 6 with the gov-EPC basement sentinel. +_WALL_SYSTEM_BUILT = 6 + # RdSAP `wall_insulation_type` codes by insulation-state suffix # (domain/sap10_ml/rdsap_uvalues.py): external 1, filled-cavity 2, internal 3, # as-built/uninsulated 4, cavity+external 6, cavity+internal 7. @@ -66,11 +69,18 @@ def wall_overlay_for( if building_part == 0 else BuildingPartIdentifier.extension(building_part) ) + # System-built is RdSAP code 6, which collides with the gov-EPC code-6 + # basement sentinel that `main_wall_is_basement` falls back to. A landlord + # naming a System-built wall is asserting the material, not a basement — pin + # the flag False so the override isn't mis-read as one (ADR-0033 / the + # overlay mirror of the mapper's `_clear_basement_flag_when_system_built`). + wall_is_basement = False if construction == _WALL_SYSTEM_BUILT else None return EpcSimulation( building_parts={ identifier: BuildingPartOverlay( wall_construction=construction, wall_insulation_type=insulation, + wall_is_basement=wall_is_basement, ) } )