An electric room heaters override sets the room-heater heating category 🟥

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-03 09:11:38 +00:00
parent cf50c53cad
commit 5e7e51d8b2

View file

@ -58,6 +58,22 @@ def test_electric_room_heaters_assume_a_dual_economy7_meter() -> None:
assert simulation.heating.meter_type == "Dual"
def test_electric_room_heaters_overlay_the_room_heater_category() -> None:
# A landlord "Electric room heaters" override replaces the lodged system, so
# the overlay must stamp the room-heater heating category (SAP Table 4a
# Category 10). Leaving it unset lets a replaced storage heater's category 7
# survive onto the effective cert, which the SAP 10.2 Table 12a resolver
# (keyed on category) mis-reads as off-peak storage and bills the peaky room
# heaters at the all-night low rate.
# Act
simulation = main_heating_overlay_for("Electric room heaters", 0)
# Assert — SAP Table 4a Category 10 (Room heaters).
assert simulation is not None
assert simulation.heating is not None
assert simulation.heating.main_heating_category == 10
@pytest.mark.parametrize(
("main_heating_value", "code"),
[