diff --git a/domain/epc/property_overrides/main_heating_guard.py b/domain/epc/property_overrides/main_heating_guard.py index fe8e54126..9eb50548b 100644 --- a/domain/epc/property_overrides/main_heating_guard.py +++ b/domain/epc/property_overrides/main_heating_guard.py @@ -8,4 +8,17 @@ from domain.epc.property_overrides.main_heating_system_type import ( def main_heating_guard(description: str) -> Optional[MainHeatingSystemType]: - raise NotImplementedError + """Deterministically resolve a High Heat Retention Storage Heater (HHRSH) + description, which the LLM funnelled into ``"Electric storage heaters, old"`` + (SAP 401) for want of an HHRSH archetype (#1376 / ADR-0044). + + HHRSH is a distinct RdSAP system (SAP Table 4a 409) with its own intrinsic + charge control (2404) — the *best* modern storage, not the *worst* old large- + volume type. This guard claims only the structured HHRSH phrasing and returns + ``None`` for every other description (the remaining storage subtypes the LLM + already classifies correctly, and varied phrasings), so they still reach the + LLM classifier via ``GuardedColumnClassifier``. + """ + if "high heat retention" in description.lower(): + return MainHeatingSystemType.ELECTRIC_STORAGE_HIGH_HEAT_RETENTION + return None