From 316a1122580547f5260a84b303996f22e5889dcd Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 16 Jul 2026 16:35:12 +0000 Subject: [PATCH] =?UTF-8?q?Rate=20gas=20room-heater=20main=20systems=20at?= =?UTF-8?q?=20Table=204a=20code=20603=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 | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index 2631a9973..7d8dedfc6 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -2769,6 +2769,34 @@ class TestPasHubMainHeatingControlCoding: assert main.main_heating_control == 2601 assert _control_type(main) == 2 + def test_gas_room_heater_type_maps_to_table_4a_code_603(self) -> None: + # Arrange — a gas room-heater main system (verbatim fixture + # 500797805807 lodgement): open flue, 1980+, open fronted, sealed to + # fireplace → Table 4a code 603 (PCDB "sitting proud of, and sealed + # to, fireplace opening", eff 63%). 604 (with back boiler) and 605 + # (flush-fitting live fuel effect) rejected — neither qualifier is in + # the label. + 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"] = ( + "Gas fire, Open flue, 1980 or later (Open fronted), " + "Sealed to fireplace" + ) + mh["fuel"] = "Mains Gas" + 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 — the gas Table 4a row and the mains-gas fuel code. + assert main.sap_main_heating_code == 603 + assert main.main_fuel_type == 26 + @pytest.mark.parametrize( "heater_type, expected_system_code", [