From 82cb567a1d7dfe6c8d13ee50195ea1a3f7e8c750 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 3 Jul 2026 14:06:52 +0000 Subject: [PATCH] =?UTF-8?q?Electric=20boiler=20and=20CPSU=20overrides=20st?= =?UTF-8?q?amp=20the=20Table=204a=20boiler=20category=20(2)=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 --- .../epc/property_overlays/main_heating_system_overlay.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/domain/epc/property_overlays/main_heating_system_overlay.py b/domain/epc/property_overlays/main_heating_system_overlay.py index f99a24f5c..295a7e18f 100644 --- a/domain/epc/property_overlays/main_heating_system_overlay.py +++ b/domain/epc/property_overlays/main_heating_system_overlay.py @@ -130,6 +130,13 @@ _ELECTRIC_ROOM_HEATER_CODES = frozenset(range(691, 702)) # unambiguously electric, so they drag electricity like the electric room heaters # (ADR-0045, closing the prior no-fuel gap on 191/192). _ELECTRIC_BOILER_CODES = frozenset({191, 192}) +# SAP Table 4a "boiler system" category — codes 191/192 are wet electric +# boilers, same category the gas-boiler overlay stamps. Forced so an +# electric-boiler override never keeps the replaced system's category: on +# portfolio 796 an inherited 6 (community) or 4 (heat pump) suppressed the +# HHRSH pathway, and an inherited 7 (storage) made the Table 12a resolver bill +# direct-acting heat wholly at the off-peak low rate (ADR-0052, #1444). +_ELECTRIC_BOILER_CATEGORY = 2 # Electric underfloor — SAP Table 4a 421/422 (off-peak) and 424 (screed) — also # unambiguously electric (ADR-0046). _ELECTRIC_UNDERFLOOR_CODES = frozenset({421, 422, 424}) @@ -304,6 +311,8 @@ def _category_for(code: int) -> Optional[int]: return _STORAGE_HEATER_CATEGORY if code in _ELECTRIC_UNDERFLOOR_CODES: return _UNDERFLOOR_CATEGORY + if code in _ELECTRIC_BOILER_CODES: + return _ELECTRIC_BOILER_CATEGORY if code in _HEAT_PUMP_CODES: return _HEAT_PUMP_CATEGORY if code in _HEAT_NETWORK_CODES: