Merge pull request #1331 from Hestia-Homes/feature/handle-main_heating_category-11

Fix UnmappedSapCode for main_heating_category 11 (electric ceiling heating)
This commit is contained in:
Daniel Roth 2026-06-25 17:14:55 +01:00 committed by GitHub
commit 8322c197aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -995,6 +995,8 @@ _SECONDARY_HEATING_FRACTION_BY_CATEGORY: Final[dict[int, float]] = {
# p.188). Cert 0380 (warm air mains gas, code 506, +
# electric room-heater secondary) raised here before.
10: 0.20,
11: 0.10, # Electric ceiling heating (SAP code 701): direct-acting
# electric, SAP 10.2 Table 11 "Other electric systems" row.
}
_SECONDARY_HEATING_FRACTION_DEFAULT: Final[float] = 0.10

View file

@ -4958,6 +4958,7 @@ def test_secondary_heating_fraction_for_category_full_table_11_coverage() -> Non
assert _secondary_heating_fraction_for_category(5) == 0.10
assert _secondary_heating_fraction_for_category(6) == 0.10
assert _secondary_heating_fraction_for_category(7) == 0.15
assert _secondary_heating_fraction_for_category(8) == 0.10 # was untested
# Category 9 = warm-air systems (NOT heat pump). A gas/oil warm-air
# unit is an "All gas, liquid and solid fuel systems" row (0.10);
# electric warm air is "Other electric systems" (also 0.10) — so 0.10
@ -4966,6 +4967,7 @@ def test_secondary_heating_fraction_for_category_full_table_11_coverage() -> Non
# secondary) previously raised UnmappedSapCode here, blocking it.
assert _secondary_heating_fraction_for_category(9) == 0.10
assert _secondary_heating_fraction_for_category(10) == 0.20
assert _secondary_heating_fraction_for_category(11) == 0.10 # electric ceiling heating (SAP code 701)
# Absent
assert _secondary_heating_fraction_for_category(None) == 0.10
# Lodging present but unmapped → raise