Drag an air source heat pump's coherent companions 🟥

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-30 17:30:38 +00:00
parent 1552e24fa5
commit 848252e5d4

View file

@ -468,3 +468,22 @@ def test_air_source_heat_pump_decodes_to_the_default_ashp_code() -> None:
assert simulation is not None
assert simulation.heating is not None
assert simulation.heating.sap_main_heating_code == 211
def test_air_source_heat_pump_drags_its_coherent_companions() -> None:
# A heat pump is unambiguously electric (natural fuel 29) and SAP Table 4a
# category 4, billed on an off-peak (Dual) meter (§12 Rule 3 lists heat pumps
# 211-224). The overlay drags these code-derived companions so a system-only
# override is self-coherent on a cert that lodged a different system
# (ADR-0035 / ADR-0041).
# Act
simulation = main_heating_overlay_for("Air source heat pump", 0)
# Assert
assert simulation is not None
assert simulation.heating is not None
heating = simulation.heating
assert heating.main_heating_category == 4
assert heating.main_fuel_type == 29
assert heating.meter_type == "Dual"