Synthesise lighting bulb counts from outlet counts for 18.0 certs 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-06-11 11:59:33 +00:00
parent 70af9dee65
commit 2b5d596f9b

View file

@ -779,9 +779,16 @@ class EpcPropertyDataMapper:
open_chimneys_count=0,
insulated_door_count=schema.insulated_door_count,
draughtproofed_door_count=None,
# ADR-0028: 18.0 gives total + low-energy OUTLET counts, not an
# LED/CFL/incandescent split. Low-energy -> the calculator's LEL
# path; the remainder is incandescent (1 outlet ~= 1 bulb).
led_fixed_lighting_bulbs_count=0,
cfl_fixed_lighting_bulbs_count=0,
incandescent_fixed_lighting_bulbs_count=0,
incandescent_fixed_lighting_bulbs_count=(
schema.fixed_lighting_outlets_count
- schema.low_energy_fixed_lighting_outlets_count
),
low_energy_fixed_lighting_bulbs_count=schema.low_energy_fixed_lighting_outlets_count,
roofs=EpcPropertyDataMapper._map_energy_elements(schema.roofs),
walls=EpcPropertyDataMapper._map_energy_elements(schema.walls),
floors=EpcPropertyDataMapper._map_energy_elements(schema.floors),