From d54d4a0b437945edda2dce8c9961f3c335b8b485 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Sat, 23 Sep 2023 18:50:30 +0200 Subject: [PATCH] Add filter for Aal Elnet (#15621) Signed-off-by: Jacob Laursen Signed-off-by: querdenker2k --- .../internal/api/DatahubTariffFilterFactory.java | 4 ++++ .../src/main/resources/OH-INF/config/config.xml | 1 + .../main/resources/OH-INF/i18n/energidataservice.properties | 1 + 3 files changed, 6 insertions(+) diff --git a/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/api/DatahubTariffFilterFactory.java b/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/api/DatahubTariffFilterFactory.java index 31a1f5b866768..81b22d631007b 100644 --- a/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/api/DatahubTariffFilterFactory.java +++ b/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/api/DatahubTariffFilterFactory.java @@ -27,6 +27,7 @@ @NonNullByDefault public class DatahubTariffFilterFactory { + private static final String GLN_AAL_ELNET = "5790001095451"; private static final String GLN_CERIUS = "5790000705184"; private static final String GLN_DINEL = "5790000610099"; private static final String GLN_ELEKTRUS = "5790000836239"; @@ -71,6 +72,9 @@ public class DatahubTariffFilterFactory { public static DatahubTariffFilter getNetTariffByGLN(String globalLocationNumber) { switch (globalLocationNumber) { + case GLN_AAL_ELNET: + return new DatahubTariffFilter(Set.of(ChargeTypeCode.of("AAL-NT-05")), Set.of(NOTE_NET_TARIFF_C_HOUR), + DateQueryParameter.of(DateQueryParameterType.START_OF_DAY)); case GLN_CERIUS: return new DatahubTariffFilter(Set.of(ChargeTypeCode.of("30TR_C_ET")), Set.of(NOTE_NET_TARIFF_C_HOUR)); case GLN_DINEL: diff --git a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/config/config.xml b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/config/config.xml index 02791241bc9ce..208b22d4e452a 100644 --- a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/config/config.xml +++ b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/config/config.xml @@ -28,6 +28,7 @@ Global Location Number of the grid company. false + diff --git a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties index 70e7d27d6528a..420d2314456a9 100644 --- a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties +++ b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties @@ -18,6 +18,7 @@ thing-type.config.energidataservice.service.energinetGLN.label = Energinet GLN thing-type.config.energidataservice.service.energinetGLN.description = Global Location Number of Energinet. thing-type.config.energidataservice.service.gridCompanyGLN.label = Grid Company GLN thing-type.config.energidataservice.service.gridCompanyGLN.description = Global Location Number of the grid company. +thing-type.config.energidataservice.service.gridCompanyGLN.option.5790001095451 = Aal Elnet thing-type.config.energidataservice.service.gridCompanyGLN.option.5790000705184 = Cerius thing-type.config.energidataservice.service.gridCompanyGLN.option.5790000610099 = Dinel thing-type.config.energidataservice.service.gridCompanyGLN.option.5790002502699 = El-net Kongerslev