From 8b242b7da85b0f9086a8125fef3fa9313ec9bf15 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 16 Jul 2026 16:07:36 +0000 Subject: [PATCH] =?UTF-8?q?Rate=20unthermostated=20room=20heaters=20via=20?= =?UTF-8?q?Table=204e=20Group=206=20code=202601=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .../epc/domain/tests/test_from_site_notes.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index 16ad4f4d8..da5b68768 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -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