diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index ec27d6fcb..e89062610 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -2966,8 +2966,9 @@ def _sap_17_1_meter_type(electricity_tariff: Optional[int]) -> str: The two code spaces *differ* (epc_codes.csv `energy_tariff` vs `_METER_INT_TO_TARIFF`): full-SAP 1=standard / 2=off-peak-7hr / 3=off-peak- - 10hr / 4=24-hour, whereas RdSAP meter 1=dual-7hr / 2=single / 3=unknown / - 4=24-hour. Passing the full-SAP code straight through (the prior bug) read a + 10hr / 4=24-hour / 5=off-peak-18hr, whereas RdSAP meter 1=dual-7hr / + 2=single / 3=unknown / 4=24-hour. Passing the full-SAP code straight + through (the prior bug) read a standard-tariff cert as Economy 7 (over-rated) and an Economy-7 cert as single (under-rated). Map onto the RdSAP word aliases so the resolved tariff is correct; absent/ND → "" (the unknown→standard sentinel).""" @@ -2985,6 +2986,7 @@ _SAP_TARIFF_TO_RDSAP_METER_TYPE: dict[int, str] = { 2: "dual", # off-peak 7 hour (Economy 7) 3: "dual", # off-peak 10 hour (§12 dispatch resolves 7/10hr) 4: "dual (24 hour)", # 24-hour tariff + 5: "off-peak 18 hour", # off-peak 18 hour (Table 12a EIGHTEEN_HOUR) }