Resolve an electric-boiler override to SAP 191 dragging electricity 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-01 15:44:07 +00:00
parent e83c420f3b
commit 098edf6592
2 changed files with 10 additions and 0 deletions

View file

@ -112,6 +112,10 @@ _CATEGORY_10_ROOM_HEATER_CODES = (
_ELECTRICITY_FUEL = 29
_HOUSE_COAL_FUEL = 33
_ELECTRIC_ROOM_HEATER_CODES = frozenset(range(691, 702))
# Direct-acting electric boiler (SAP Table 4a 191) — unambiguously electric, so it
# drags electricity like the electric room heaters (ADR-0045, closing the prior
# no-fuel gap on 191).
_ELECTRIC_BOILER_CODE = 191
# Heat pumps (SAP Table 4a 211-224 wet, 521-527 warm-air) are category 4 and
# unambiguously electric (natural fuel 29). Modellable on the default code's SPF
@ -173,6 +177,10 @@ _MAIN_HEATING_CODES: dict[str, int] = {
# generic manual-storage default (ADR-0044).
"Electric storage heaters, high heat retention": 409,
"Direct-acting electric": 191,
# A-rated electric boiler off the Gas CPSU dumping ground — SAP Table 4a 191
# (direct-acting electric boiler). Unambiguously electric, so it drags
# electricity below (ADR-0045).
"Electric boiler": 191,
"Electric room heaters": 691,
"Solid fuel room heater, closed": 633,
# Solid-fuel room heaters off the Gas CPSU dumping ground (ADR-0045). SAP
@ -252,6 +260,7 @@ def _natural_fuel_for(code: int) -> Optional[int]:
code in _ELECTRIC_ROOM_HEATER_CODES
or code in _HEAT_PUMP_CODES
or code == _HHR_STORAGE_CODE
or code == _ELECTRIC_BOILER_CODE
):
return _ELECTRICITY_FUEL
if code in _SOLID_FUEL_ROOM_HEATER_CODES:

View file

@ -27,6 +27,7 @@ class MainHeatingSystemType(Enum):
"Electric storage heaters, high heat retention"
)
DIRECT_ELECTRIC = "Direct-acting electric"
ELECTRIC_BOILER = "Electric boiler"
ELECTRIC_ROOM_HEATERS = "Electric room heaters"
SOLID_FUEL_ROOM_HEATER_CLOSED = "Solid fuel room heater, closed"
SOLID_FUEL_ROOM_HEATER_OPEN_FIRE = "Solid fuel room heater, open fire"