mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Recognise gas room-heater variants by their SAP codes 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1d0633f4a5
commit
60e27c80a1
1 changed files with 28 additions and 0 deletions
|
|
@ -555,3 +555,31 @@ def test_oil_room_heater_drags_its_coherent_room_heater_companions() -> None:
|
|||
assert heating.main_heating_control == 2601
|
||||
assert heating.main_fuel_type == 28
|
||||
assert heating.meter_type == "Single"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("value", "code"),
|
||||
[
|
||||
("Gas room heater, condensing fire", 611),
|
||||
("Gas room heater, decorative fuel-effect", 612),
|
||||
("Gas room heater, flush live-effect", 605),
|
||||
("Gas room heater, open flue 1980 or later", 603),
|
||||
("Gas room heater, open flue pre-1980", 601),
|
||||
],
|
||||
)
|
||||
def test_gas_room_heater_variants_decode_to_their_sap_codes(
|
||||
value: str, code: int
|
||||
) -> None:
|
||||
# Gas room heaters span a wide efficiency range (decorative 0.20 -> condensing
|
||||
# 0.85), so each catalogue variant maps to its own SAP Table 4a code rather
|
||||
# than collapsing to one representative — which would over-credit a decorative
|
||||
# fire and under-credit a condensing one. Today they mis-bucket to "Gas
|
||||
# boiler, regular" (ADR-0041).
|
||||
|
||||
# Act
|
||||
simulation = main_heating_overlay_for(value, 0)
|
||||
|
||||
# Assert
|
||||
assert simulation is not None
|
||||
assert simulation.heating is not None
|
||||
assert simulation.heating.sap_main_heating_code == code
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue