Rate unthermostated room heaters via Table 4e Group 6 code 2601 🟥

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-16 16:07:36 +00:00
parent 6750e48609
commit 8b242b7da8

View file

@ -2669,6 +2669,33 @@ class TestPasHubMainHeatingControlCoding:
):
EpcPropertyDataMapper.from_site_notes(survey)
def test_room_heater_no_thermostatic_control_maps_to_group6_code(self) -> None:
# Arrange — a Table 4e Group 6 room-heater dwelling with the lowest-
# control label: "No thermostatic control of room temperature" → 2601
# (PCDB `room_heater_systems_controls`, control type 2, +0.3 °C MIT
# adjustment) — one step below the already-mapped 2602.
from domain.sap10_calculator.rdsap.cert_to_inputs import (
_control_type, # pyright: ignore[reportPrivateUsage]
)
raw = load("pashub_rdsap_site_notes_example1.json")
mh = raw["heating_and_hot_water"]["main_heating"]
mh["system_type"] = "Room heaters"
mh["community_heat_source"] = "Panel, Convector or radiant heaters"
mh["fuel"] = "Electricity"
mh["product_id"] = 0
mh["controls"] = "No thermostatic control of room temperature"
survey = from_dict(PasHubRdSapSiteNotes, raw)
# Act
main = EpcPropertyDataMapper.from_site_notes(
survey
).sap_heating.main_heating_details[0]
# Assert
assert main.main_heating_control == 2601
assert _control_type(main) == 2
def test_heat_network_control_maps_to_group3_code(self) -> None:
# Arrange — a Table 4e Group 3 heat network (`system_type =
# "Community heating system"`). Its control label carries a Group 3