From 2b5d596f9b58f63c6f931a3e8e04383402b3ccb6 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Thu, 11 Jun 2026 11:59:33 +0000 Subject: [PATCH] =?UTF-8?q?Synthesise=20lighting=20bulb=20counts=20from=20?= =?UTF-8?q?outlet=20counts=20for=2018.0=20certs=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- datatypes/epc/domain/mapper.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index a2f436a6..a1ec7d68 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -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),