mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Drag an oil room heater's coherent companions 🟩
Generalise the room-heater category-10 + conservative-control drag to cover both solid and oil families; oil's natural fuel is heating oil (28). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
34302adce5
commit
1d0633f4a5
1 changed files with 12 additions and 2 deletions
|
|
@ -78,6 +78,14 @@ _STORAGE_HEATER_CODES = frozenset(range(401, 410))
|
|||
_ROOM_HEATER_CATEGORY = 10
|
||||
_ROOM_HEATER_CONTROL = 2601
|
||||
_SOLID_FUEL_ROOM_HEATER_CODES = frozenset(range(631, 637))
|
||||
# Oil room heaters (SAP Table 4a 621-625) — category 10, conservative room-heater
|
||||
# control, natural fuel heating oil (RdSAP main_fuel 28).
|
||||
_OIL_ROOM_HEATER_CODES = frozenset(range(621, 626))
|
||||
_OIL_FUEL = 28
|
||||
# Fuel-burning room heaters (solid + oil) share category 10 + the conservative
|
||||
# room-heater control; only the natural fuel differs by family. (Distinct from
|
||||
# `_ROOM_HEATER_CODES` above, which is the electric-room-heater dual-meter set.)
|
||||
_CATEGORY_10_ROOM_HEATER_CODES = _SOLID_FUEL_ROOM_HEATER_CODES | _OIL_ROOM_HEATER_CODES
|
||||
|
||||
# Natural-fuel coherence (ADR-0041): where an archetype unambiguously implies a
|
||||
# fuel, the overlay drags it so a system-only override is self-coherent on a cert
|
||||
|
|
@ -182,7 +190,7 @@ def _control_for(code: int) -> Optional[int]:
|
|||
return _MANUAL_CHARGE_CONTROL
|
||||
if code in _GAS_BOILER_CODES:
|
||||
return _FULL_BOILER_CONTROL
|
||||
if code in _SOLID_FUEL_ROOM_HEATER_CODES:
|
||||
if code in _CATEGORY_10_ROOM_HEATER_CODES:
|
||||
return _ROOM_HEATER_CONTROL
|
||||
return None
|
||||
|
||||
|
|
@ -191,7 +199,7 @@ def _category_for(code: int) -> Optional[int]:
|
|||
"""The SAP Table 4a heating category a code implies, where the archetype
|
||||
fixes it. Room heaters are category 10 — set so a system-only override reads
|
||||
as a room-heater system, not whatever category the replaced system carried."""
|
||||
if code in _SOLID_FUEL_ROOM_HEATER_CODES:
|
||||
if code in _CATEGORY_10_ROOM_HEATER_CODES:
|
||||
return _ROOM_HEATER_CATEGORY
|
||||
if code in _HEAT_PUMP_CODES:
|
||||
return _HEAT_PUMP_CATEGORY
|
||||
|
|
@ -208,6 +216,8 @@ def _natural_fuel_for(code: int) -> Optional[int]:
|
|||
return _ELECTRICITY_FUEL
|
||||
if code in _SOLID_FUEL_ROOM_HEATER_CODES:
|
||||
return _HOUSE_COAL_FUEL
|
||||
if code in _OIL_ROOM_HEATER_CODES:
|
||||
return _OIL_FUEL
|
||||
if code in _COMMUNITY_BOILER_CODES:
|
||||
return _COMMUNITY_GAS_FUEL
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue