From c6c07c2c51cee18465fc55c675e2516b81f18561 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 29 Jun 2026 22:50:34 +0000 Subject: [PATCH] =?UTF-8?q?Full-SAP=2018-hour=20off-peak=20tariff=20(code?= =?UTF-8?q?=205)=20must=20resolve=20to=20EIGHTEEN=5FHOUR=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The full-SAP energy_tariff code space includes 5=off-peak-18-hour, but _sap_17_1_meter_type only maps 1-4, dropping code 5 to "" → STANDARD. Real SAP-19.1.0/19.2.0 certs lodge tariff 5, so the 18-hour off-peak split is silently lost. Co-Authored-By: Claude Opus 4.8 (1M context) --- datatypes/epc/domain/tests/test_from_sap_schema.py | 1 + 1 file changed, 1 insertion(+) diff --git a/datatypes/epc/domain/tests/test_from_sap_schema.py b/datatypes/epc/domain/tests/test_from_sap_schema.py index 7a682c8d7..ec9981009 100644 --- a/datatypes/epc/domain/tests/test_from_sap_schema.py +++ b/datatypes/epc/domain/tests/test_from_sap_schema.py @@ -181,6 +181,7 @@ class TestFullSapElectricityTariffTranslation: (2, "SEVEN_HOUR"), # off-peak 7-hour → Economy 7 (3, "SEVEN_HOUR"), # off-peak 10-hour → dual (§12 resolves 7/10hr) (4, "TWENTY_FOUR_HOUR"), # 24-hour tariff (e.g. property 709874 — unchanged) + (5, "EIGHTEEN_HOUR"), # off-peak 18-hour — was dropped to "" → STANDARD (None, "STANDARD"), # absent/ND → unknown → standard ], )