mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Resolve a landlord from-main-gas water-heating override to its codes 🟩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8f7a344707
commit
7d70c1d298
1 changed files with 19 additions and 2 deletions
|
|
@ -13,10 +13,27 @@ from __future__ import annotations
|
|||
|
||||
from typing import Optional
|
||||
|
||||
from domain.modelling.simulation import EpcSimulation
|
||||
from domain.modelling.simulation import EpcSimulation, HeatingOverlay
|
||||
|
||||
# Canonical "<system>, <fuel>" description → (water_heating_code, water_heating_fuel).
|
||||
# water_heating_code: 901 "from main system" (SAP Table 4a inherit-from-main),
|
||||
# 903 "electric immersion". Fuel codes are the modern RdSAP "(not community)"
|
||||
# family (26 mains gas, 29 electricity), matching the main_fuel overlay.
|
||||
_WATER_HEATING_CODES: dict[str, tuple[int, int]] = {
|
||||
"From main system, mains gas": (901, 26),
|
||||
}
|
||||
|
||||
|
||||
def water_heating_overlay_for(
|
||||
water_heating_value: str, building_part: int
|
||||
) -> Optional[EpcSimulation]:
|
||||
raise NotImplementedError
|
||||
codes = _WATER_HEATING_CODES.get(water_heating_value)
|
||||
if codes is None:
|
||||
return None
|
||||
water_heating_code, water_heating_fuel = codes
|
||||
return EpcSimulation(
|
||||
heating=HeatingOverlay(
|
||||
water_heating_code=water_heating_code,
|
||||
water_heating_fuel=water_heating_fuel,
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue