From 01e7e1d831c94dba57374f41b0a58716be372360 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 1 Jul 2026 14:29:41 +0000 Subject: [PATCH] =?UTF-8?q?Drag=20HHRSH's=20intrinsic=20control,=20electri?= =?UTF-8?q?city=20fuel=20and=20off-peak=20meter=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) --- .../main_heating_system_overlay.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/domain/epc/property_overlays/main_heating_system_overlay.py b/domain/epc/property_overlays/main_heating_system_overlay.py index d93790a54..7d34546ce 100644 --- a/domain/epc/property_overlays/main_heating_system_overlay.py +++ b/domain/epc/property_overlays/main_heating_system_overlay.py @@ -67,6 +67,12 @@ _ASSUMED_DUAL_METER_CODES = OFF_PEAK_IMPLYING_HEATING_CODES | _ROOM_HEATER_CODES # systems that take a charge control. _MANUAL_CHARGE_CONTROL = 2401 _STORAGE_HEATER_CODES = frozenset(range(401, 410)) +# High heat retention storage heaters (SAP Table 4a 409) take a SINGLE intrinsic +# charge control — Table 4e 2404 (HHR, 0 C adjustment). It is named by the +# archetype, not unobserved, so 409 drags 2404 rather than the manual default +# (ADR-0044) — the only storage code that overrides `_MANUAL_CHARGE_CONTROL`. +_HHR_STORAGE_CODE = 409 +_HHR_CHARGE_CONTROL = 2404 # SAP Table 4a category 10 ("Room heaters") and its conservative Table 4e Group 6 # control. A landlord names a room heater, not its control; code 2601 ("no @@ -207,6 +213,8 @@ def _control_for(code: int) -> Optional[int]: conservative manual charge control for storage heaters, full modern controls for a gas boiler, None for systems that take neither (direct-acting electric). Overwrites a stale control inherited from the system being replaced.""" + if code == _HHR_STORAGE_CODE: + return _HHR_CHARGE_CONTROL if code in _STORAGE_HEATER_CODES: return _MANUAL_CHARGE_CONTROL if code in _GAS_BOILER_CODES: @@ -233,7 +241,11 @@ def _natural_fuel_for(code: int) -> Optional[int]: """The fuel an archetype unambiguously implies (a coherent default), or None where the fuel is ambiguous and must come from the `main_fuel` override. A present `main_fuel` override wins by last-wins composition.""" - if code in _ELECTRIC_ROOM_HEATER_CODES or code in _HEAT_PUMP_CODES: + if ( + code in _ELECTRIC_ROOM_HEATER_CODES + or code in _HEAT_PUMP_CODES + or code == _HHR_STORAGE_CODE + ): return _ELECTRICITY_FUEL if code in _SOLID_FUEL_ROOM_HEATER_CODES: return _HOUSE_COAL_FUEL