From 70a419c66103968aa5f563f5f682037d7864325b Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Mon, 10 Apr 2023 23:06:10 +0200 Subject: [PATCH] Add filter for another grid company Signed-off-by: Jacob Laursen --- .../internal/api/DatahubTariffFilterFactory.java | 5 +++++ .../src/main/resources/OH-INF/config/config.xml | 1 + .../main/resources/OH-INF/i18n/energidataservice.properties | 1 + 3 files changed, 7 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 0d585ca282af3..deb9d67fc4df9 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 @@ -40,6 +40,7 @@ public class DatahubTariffFilterFactory { private static final String GLN_IKAST_E1_NET = "5790000682102"; private static final String GLN_KONSTANT = "5790000704842"; private static final String GLN_L_NET = "5790001090111"; + private static final String GLN_MIDTFYNS_ELFORSYNING = "5790001089023"; private static final String GLN_N1 = "5790001089030"; private static final String GLN_N1_RANDERS = "5790000681372"; private static final String GLN_NETSELSKABET_ELVAERK = "5790000681075"; @@ -59,6 +60,7 @@ public class DatahubTariffFilterFactory { private static final String NOTE_NET_TARIFF = "Nettarif"; private static final String NOTE_NET_TARIFF_C = NOTE_NET_TARIFF + " C"; private static final String NOTE_NET_TARIFF_C_HOUR = NOTE_NET_TARIFF_C + " time"; + private static final String NOTE_NET_TARIFF_C_FLEX = NOTE_NET_TARIFF_C + " Flex"; private static final String NOTE_SYSTEM_TARIFF = "Systemtarif"; private static final String NOTE_ELECTRICITY_TAX = "Elafgift"; private static final String NOTE_TRANSMISSION_NET_TARIFF = "Transmissions nettarif"; @@ -100,6 +102,9 @@ public static DatahubTariffFilter getNetTariffByGLN(String globalLocationNumber) Set.of(), DateQueryParameter.of(KONSTANT_CUTOFF_DATE)); case GLN_L_NET: return new DatahubTariffFilter(Set.of(ChargeTypeCode.of("4010")), Set.of(NOTE_NET_TARIFF_C_HOUR)); + case GLN_MIDTFYNS_ELFORSYNING: + return new DatahubTariffFilter(Set.of(ChargeTypeCode.of("TNT15000")), Set.of(NOTE_NET_TARIFF_C_FLEX), + DateQueryParameter.of(DateQueryParameterType.START_OF_DAY, Duration.ofDays(-1))); case GLN_N1: return new DatahubTariffFilter(Set.of(ChargeTypeCode.of("CD"), ChargeTypeCode.of("CD R")), Set.of(), DateQueryParameter.of(N1_CUTOFF_DATE)); 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 95194619ac9d2..6a7c81b6362f9 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 @@ -40,6 +40,7 @@ + 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 cddea56eff981..e7a0b12674c17 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 @@ -30,6 +30,7 @@ thing-type.config.energidataservice.service.gridCompanyGLN.option.5790000610839 thing-type.config.energidataservice.service.gridCompanyGLN.option.5790000682102 = Ikast El Net thing-type.config.energidataservice.service.gridCompanyGLN.option.5790000704842 = Konstant thing-type.config.energidataservice.service.gridCompanyGLN.option.5790001090111 = L-Net +thing-type.config.energidataservice.service.gridCompanyGLN.option.5790001089023 = Midtfyns Elforsyning thing-type.config.energidataservice.service.gridCompanyGLN.option.5790001089030 = N1 thing-type.config.energidataservice.service.gridCompanyGLN.option.5790000681372 = N1 Randers thing-type.config.energidataservice.service.gridCompanyGLN.option.5790000681075 = Netselskabet Elværk