From fc53594c990cfb80e005ab86e81ffaecc79dd0ca Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 14 Jul 2026 15:59:45 +0000 Subject: [PATCH] =?UTF-8?q?Resolve=20PasHub=20main-heating=20control=20lab?= =?UTF-8?q?el=20to=20its=20SAP=20Table=204e=20code=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- datatypes/epc/domain/tests/test_from_site_notes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index e23d71f57..7aad4e162 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -170,6 +170,13 @@ class TestFromSiteNotesExample1: result.sap_heating.main_heating_details[0].heat_emitter_type == "Radiators" ) + def test_main_heating_control(self, result: EpcPropertyData) -> None: + # heating_and_hot_water.main_heating.controls: + # "Programmer, room thermostat and TRVs" is resolved at the mapper + # boundary to its SAP 10.2 Table 4e code (2106), not the raw label — + # the calculator's `_control_type` keys off the int code. + assert result.sap_heating.main_heating_details[0].main_heating_control == 2106 + def test_main_heating_no_fghrs(self, result: EpcPropertyData) -> None: # heating_and_hot_water.main_heating.flue_gas_heat_recovery_system: false assert result.sap_heating.main_heating_details[0].has_fghrs is False @@ -383,7 +390,7 @@ class TestFromSiteNotesExample1: heat_emitter_type="Radiators", emitter_temperature="Unknown", fan_flue_present=True, - main_heating_control="Programmer, room thermostat and TRVs", + main_heating_control=2106, condensing=True, weather_compensator=False, central_heating_pump_age_str="Unknown",