mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Cert 000565 lodges §14.1 Main Heating2 as PCDB 15100 (Vaillant Ecotec
plus 415, 88%, mains gas, 0% space heat) — this is the system that
services DHW via `Water Heating SapCode 914` ("from second main
system"). The previous extractor / mapper shape supported only ONE
main heating system, dropping Main 2 entirely.
New shape:
- `MainHeating2` dataclass (slim §14.1-shaped: PCDB ref, fuel type,
flue type, fan_assisted_flue, percentage_of_heat, SAP code)
- `MainHeating.main_heating_2: Optional[MainHeating2]` — None when
§14.1 is absent OR lodges only placeholder zeros (the PCDB-only
convention; the two JSON fixtures + 14 existing Summary fixtures
all lodge "0 / 0" for an absent Main 2)
- `_extract_main_heating_2` parses §14.1; returns None when neither
PCDB ref nor SAP code identifies Main 2
- `_map_elmhurst_main_heating_2` builds `MainHeatingDetail` from the
Main 2 lodgement with `main_heating_number=2` and `main_heating_
fraction=percentage_of_heat`; strict-raises `UnmappedElmhurstLabel`
(mirroring Slice S0380.53's Main 1 raise) when Main 2 has neither
identifier — surfaces coverage gaps at extraction time
Per RdSAP convention "0%" is lodged without a space (vs Main 1's
"100 %" with a space) — robust percentage parse via `rstrip("%")` so
both forms thread through.
Cohort impact:
- 14 existing Summary PDF fixtures + 2 JSON fixtures: Main 2 returns
None (placeholder zeros) → no 2nd MainHeatingDetail produced → no
cascade behaviour change (regression-tested: 415 pass + 10 expected
000565 fails, identical to S0380.53 baseline)
- Cert 000565: 2nd MainHeatingDetail now lodged with sap_code=None,
pcdb=15100 (Table 105 gas-boiler 88% efficiency), category=2,
fuel=26 (mains gas), fraction=0
Cascade still uses Main 1 for water-heating efficiency in the WHC
914 branch — that routing fix is the next slice. This commit is
the plumbing-only half; the SAP-result pin residuals are unchanged
at HEAD because the cascade hasn't been wired to read Main 2 yet.
Pyright net-zero on all 3 touched files.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| epc | ||
| magicplan | ||
| __init__.py | ||
| datatypes.py | ||
| enums.py | ||