]> git.basschouten.com Git - openhab-addons.git/commitdiff
Rename channels net-tariff and transmission-net-tariff (#15938)
authorJacob Laursen <jacob-github@vindvejr.dk>
Thu, 23 Nov 2023 18:36:30 +0000 (19:36 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Nov 2023 18:36:30 +0000 (19:36 +0100)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
15 files changed:
bundles/org.openhab.binding.energidataservice/README.md
bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/DatahubTariff.java
bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/EnergiDataServiceBindingConstants.java
bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/action/EnergiDataServiceActions.java
bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/api/DatahubTariffFilterFactory.java
bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/handler/EnergiDataServiceHandler.java
bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties
bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml
bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/thing-service.xml
bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/update/instructions.xml
bundles/org.openhab.binding.energidataservice/src/test/java/org/openhab/binding/energidataservice/internal/action/EnergiDataServiceActionsTest.java
bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/GridTariffs.json [new file with mode: 0644]
bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/NetTariffs.json [deleted file]
bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/TransmissionGridTariffs.json [new file with mode: 0644]
bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/TransmissionNetTariffs.json [deleted file]

index cf9972e47d6ef7ccccd4d0af2d1315b7073b4179..c28eb0524a008d78379ab32ada3a2abd531fab48 100644 (file)
@@ -47,15 +47,15 @@ It will not impact channels, see [Electricity Tax](#electricity-tax) for further
 
 ### Channel Group `electricity`
 
-| Channel                 | Type   | Description                                                                           | Advanced |
-|-------------------------|--------|---------------------------------------------------------------------------------------|----------|
-| spot-price              | Number | Current spot price in DKK or EUR per kWh                                              | no       |
-| net-tariff              | Number | Current net tariff in DKK per kWh. Only available when `gridCompanyGLN` is configured | no       |
-| system-tariff           | Number | Current system tariff in DKK per kWh                                                  | no       |
-| electricity-tax         | Number | Current electricity tax in DKK per kWh                                                | no       |
-| reduced-electricity-tax | Number | Current reduced electricity tax in DKK per kWh. For electric heating customers only   | no       |
-| transmission-net-tariff | Number | Current transmission net tariff in DKK per kWh                                        | no       |
-| hourly-prices           | String | JSON array with hourly prices from 24 hours ago and onward                            | yes      |
+| Channel                  | Type   | Description                                                                            | Advanced |
+|--------------------------|--------|----------------------------------------------------------------------------------------|----------|
+| spot-price               | Number | Current spot price in DKK or EUR per kWh                                               | no       |
+| grid-tariff              | Number | Current grid tariff in DKK per kWh. Only available when `gridCompanyGLN` is configured | no       |
+| system-tariff            | Number | Current system tariff in DKK per kWh                                                   | no       |
+| transmission-grid-tariff | Number | Current transmission grid tariff in DKK per kWh                                        | no       |
+| electricity-tax          | Number | Current electricity tax in DKK per kWh                                                 | no       |
+| reduced-electricity-tax  | Number | Current reduced electricity tax in DKK per kWh. For electric heating customers only    | no       |
+| hourly-prices            | String | JSON array with hourly prices from 24 hours ago and onward                             | yes      |
 
 _Please note:_ There is no channel providing the total price.
 Instead, create a group item with `SUM` as aggregate function and add the individual price items as children.
@@ -82,13 +82,13 @@ The recommended persistence strategy is `forecast`, as it ensures a clean histor
 Prices from the past 24 hours and all forthcoming prices will be stored.
 Any changes that impact published prices (e.g. selecting or deselecting VAT Profile) will result in the replacement of persisted prices within this period.
 
-#### Net Tariff
+#### Grid Tariff
 
-Discounts are automatically taken into account for channel `net-tariff` so that it represents the actual price.
+Discounts are automatically taken into account for channel `grid-tariff` so that it represents the actual price.
 
 The tariffs are downloaded using pre-configured filters for the different [Grid Company GLN's](#global-location-number-of-the-grid-company).
 If your company is not in the list, or the filters are not working, they can be manually overridden.
-To override filters, the channel `net-tariff` has the following configuration parameters:
+To override filters, the channel `grid-tariff` has the following configuration parameters:
 
 | Name            | Type    | Description                                                                                                                      | Default | Required | Advanced |
 |-----------------|---------|----------------------------------------------------------------------------------------------------------------------------------|---------|----------|----------|
@@ -145,21 +145,21 @@ The format of the `hourly-prices` JSON array is as follows:
                "hourStart": "2023-09-19T18:00:00Z",
                "spotPrice": 0.0,
                "spotPriceCurrency": "DKK",
-               "netTariff": 0.0,
+               "gridTariff": 0.0,
                "systemTariff": 0.054,
+               "transmissionGridTariff": 0.058,
                "electricityTax": 0.697,
-               "reducedElectricityTax": 0.008,
-               "transmissionNetTariff": 0.058
+               "reducedElectricityTax": 0.008
        },
        {
                "hourStart": "2023-09-19T19:00:00Z",
                "spotPrice": -0.00052,
                "spotPriceCurrency": "DKK",
-               "netTariff": 0.0,
+               "gridTariff": 0.0,
                "systemTariff": 0.054,
+               "transmissionGridTariff": 0.058,
                "electricityTax": 0.697,
-               "reducedElectricityTax": 0.008,
-               "transmissionNetTariff": 0.058
+               "reducedElectricityTax": 0.008
        }
 ]
 ```
@@ -334,14 +334,14 @@ var price = actions.calculatePrice(now.toInstant(), now.plusHours(4).toInstant,
 The parameter `priceComponents` is a case-insensitive comma-separated list of price components to include in the returned hourly prices.
 These components can be requested:
 
-| Price component       | Description             |
-|-----------------------|-------------------------|
-| SpotPrice             | Spot price              |
-| NetTariff             | Net tariff              |
-| SystemTariff          | System tariff           |
-| ElectricityTax        | Electricity tax         |
-| ReducedElectricityTax | Reduced electricity tax |
-| TransmissionNetTariff | Transmission net tariff |
+| Price component        | Description             |
+|------------------------|-------------------------|
+| SpotPrice              | Spot price               |
+| GridTariff             | Grid tariff              |
+| SystemTariff           | System tariff            |
+| TransmissionGridTariff | Transmission grid tariff |
+| ElectricityTax         | Electricity tax          |
+| ReducedElectricityTax  | Reduced electricity tax  |
 
 Using `null` as parameter returns the total prices including all price components.
 If **Reduced Electricity Tax** is set in Thing configuration, `ElectricityTax` will be excluded, otherwise `ReducedElectricityTax`.
@@ -350,7 +350,7 @@ This logic ensures consistent and comparable results not affected by artifical c
 Example:
 
 ```javascript
-var priceMap = actions.getPrices("SpotPrice,NetTariff")
+var priceMap = actions.getPrices("SpotPrice,GridTariff")
 ```
 
 ## Full Example
@@ -360,7 +360,7 @@ var priceMap = actions.getPrices("SpotPrice,NetTariff")
 ```java
 Thing energidataservice:service:energidataservice "Energi Data Service" [ priceArea="DK1", currencyCode="DKK", gridCompanyGLN="5790001089030" ] {
     Channels:
-        Number : electricity#net-tariff [ chargeTypeCodes="CD,CD R", start="StartOfYear" ]
+        Number : electricity#grid-tariff [ chargeTypeCodes="CD,CD R", start="StartOfYear" ]
 }
 ```
 
@@ -369,10 +369,10 @@ Thing energidataservice:service:energidataservice "Energi Data Service" [ priceA
 ```java
 Group:Number:SUM TotalPrice "Current Total Price" <price>
 Number SpotPrice "Current Spot Price" <price> (TotalPrice) { channel="energidataservice:service:energidataservice:electricity#spot-price" [profile="transform:VAT"] }
-Number NetTariff "Current Net Tariff" <price> (TotalPrice) { channel="energidataservice:service:energidataservice:electricity#net-tariff" [profile="transform:VAT"] }
+Number GridTariff "Current Grid Tariff" <price> (TotalPrice) { channel="energidataservice:service:energidataservice:electricity#grid-tariff" [profile="transform:VAT"] }
 Number SystemTariff "Current System Tariff" <price> (TotalPrice) { channel="energidataservice:service:energidataservice:electricity#system-tariff" [profile="transform:VAT"] }
+Number TransmissionGridTariff "Current Transmission Grid Tariff" <price> (TotalPrice) { channel="energidataservice:service:energidataservice:electricity#transmission-grid-tariff" [profile="transform:VAT"] }
 Number ElectricityTax "Current Electricity Tax" <price> (TotalPrice) { channel="energidataservice:service:energidataservice:electricity#electricity-tax" [profile="transform:VAT"] }
-Number TransmissionNetTariff "Current Transmission Tariff" <price> (TotalPrice) { channel="energidataservice:service:energidataservice:electricity#transmission-net-tariff" [profile="transform:VAT"] }
 String HourlyPrices "Hourly Prices" <price> { channel="energidataservice:service:energidataservice:electricity#hourly-prices" }
 ```
 
@@ -394,8 +394,8 @@ var priceMap = actions.getPrices(null)
 var hourStart = now.toInstant().truncatedTo(ChronoUnit.HOURS)
 logInfo("Current total price excl. VAT", priceMap.get(hourStart).toString)
 
-var priceMap = actions.getPrices("SpotPrice,NetTariff");
-logInfo("Current spot price + net tariff excl. VAT", priceMap.get(hourStart).toString)
+var priceMap = actions.getPrices("SpotPrice,GridTariff");
+logInfo("Current spot price + grid tariff excl. VAT", priceMap.get(hourStart).toString)
 
 var price = actions.calculatePrice(Instant.now, now.plusHours(1).toInstant, 150 | W)
 logInfo("Total price for using 150 W for the next hour", price.toString)
@@ -457,10 +457,10 @@ utils.javaMapToJsMap(edsActions.getPrices()).forEach((value, key) => {
 var hourStart = time.Instant.now().truncatedTo(time.ChronoUnit.HOURS);
 console.log("Current total price excl. VAT: " + priceMap.get(hourStart.toString()));
 
-utils.javaMapToJsMap(edsActions.getPrices("SpotPrice,NetTariff")).forEach((value, key) => {
+utils.javaMapToJsMap(edsActions.getPrices("SpotPrice,GridTariff")).forEach((value, key) => {
     priceMap.set(key.toString(), value);
 });
-console.log("Current spot price + net tariff excl. VAT: " + priceMap.get(hourStart.toString()));
+console.log("Current spot price + grid tariff excl. VAT: " + priceMap.get(hourStart.toString()));
 
 var price = edsActions.calculatePrice(time.Instant.now(), time.Instant.now().plusSeconds(3600), Quantity("150 W"));
 console.log("Total price for using 150 W for the next hour: " + price.toString());
index b1e360f53c648188c8b0da9eaa6f294f7909b001..f04dc6146a9360fc7b49bc47b4ca28f42a8fb92b 100644 (file)
@@ -23,11 +23,11 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
  */
 @NonNullByDefault
 public enum DatahubTariff {
-    NET_TARIFF(CHANNEL_NET_TARIFF),
+    GRID_TARIFF(CHANNEL_GRID_TARIFF),
     SYSTEM_TARIFF(CHANNEL_SYSTEM_TARIFF),
+    TRANSMISSION_GRID_TARIFF(CHANNEL_TRANSMISSION_GRID_TARIFF),
     ELECTRICITY_TAX(CHANNEL_ELECTRICITY_TAX),
-    REDUCED_ELECTRICITY_TAX(CHANNEL_REDUCED_ELECTRICITY_TAX),
-    TRANSMISSION_NET_TARIFF(CHANNEL_TRANSMISSION_NET_TARIFF);
+    REDUCED_ELECTRICITY_TAX(CHANNEL_REDUCED_ELECTRICITY_TAX);
 
     String channelId;
 
index 210b133adb074a580ffd7ced21474658f7094b3e..ccc81cb2d93d5f997779bf29717c2f134aa80a08 100644 (file)
@@ -42,22 +42,22 @@ public class EnergiDataServiceBindingConstants {
     // List of all Channel ids
     public static final String CHANNEL_SPOT_PRICE = CHANNEL_GROUP_ELECTRICITY + ChannelUID.CHANNEL_GROUP_SEPARATOR
             + "spot-price";
-    public static final String CHANNEL_NET_TARIFF = CHANNEL_GROUP_ELECTRICITY + ChannelUID.CHANNEL_GROUP_SEPARATOR
-            + "net-tariff";
+    public static final String CHANNEL_GRID_TARIFF = CHANNEL_GROUP_ELECTRICITY + ChannelUID.CHANNEL_GROUP_SEPARATOR
+            + "grid-tariff";
     public static final String CHANNEL_SYSTEM_TARIFF = CHANNEL_GROUP_ELECTRICITY + ChannelUID.CHANNEL_GROUP_SEPARATOR
             + "system-tariff";
     public static final String CHANNEL_ELECTRICITY_TAX = CHANNEL_GROUP_ELECTRICITY + ChannelUID.CHANNEL_GROUP_SEPARATOR
             + "electricity-tax";
     public static final String CHANNEL_REDUCED_ELECTRICITY_TAX = CHANNEL_GROUP_ELECTRICITY
             + ChannelUID.CHANNEL_GROUP_SEPARATOR + "reduced-electricity-tax";
-    public static final String CHANNEL_TRANSMISSION_NET_TARIFF = CHANNEL_GROUP_ELECTRICITY
-            + ChannelUID.CHANNEL_GROUP_SEPARATOR + "transmission-net-tariff";
+    public static final String CHANNEL_TRANSMISSION_GRID_TARIFF = CHANNEL_GROUP_ELECTRICITY
+            + ChannelUID.CHANNEL_GROUP_SEPARATOR + "transmission-grid-tariff";
     public static final String CHANNEL_HOURLY_PRICES = CHANNEL_GROUP_ELECTRICITY + ChannelUID.CHANNEL_GROUP_SEPARATOR
             + "hourly-prices";
 
-    public static final Set<String> ELECTRICITY_CHANNELS = Set.of(CHANNEL_SPOT_PRICE, CHANNEL_NET_TARIFF,
-            CHANNEL_SYSTEM_TARIFF, CHANNEL_ELECTRICITY_TAX, CHANNEL_REDUCED_ELECTRICITY_TAX,
-            CHANNEL_TRANSMISSION_NET_TARIFF, CHANNEL_HOURLY_PRICES);
+    public static final Set<String> ELECTRICITY_CHANNELS = Set.of(CHANNEL_SPOT_PRICE, CHANNEL_GRID_TARIFF,
+            CHANNEL_SYSTEM_TARIFF, CHANNEL_TRANSMISSION_GRID_TARIFF, CHANNEL_ELECTRICITY_TAX,
+            CHANNEL_REDUCED_ELECTRICITY_TAX, CHANNEL_HOURLY_PRICES);
 
     // List of all properties
     public static final String PROPERTY_REMAINING_CALLS = "remainingCalls";
index 9e8b307597bb21050bad0df3ff8dda4c065da885..de4f8385a2232250150bc0c30686618caa767f04 100644 (file)
@@ -63,11 +63,11 @@ public class EnergiDataServiceActions implements ThingActions {
 
     private enum PriceComponent {
         SPOT_PRICE("spotprice", null),
-        NET_TARIFF("nettariff", DatahubTariff.NET_TARIFF),
+        GRID_TARIFF("gridtariff", DatahubTariff.GRID_TARIFF),
         SYSTEM_TARIFF("systemtariff", DatahubTariff.SYSTEM_TARIFF),
+        TRANSMISSION_GRID_TARIFF("transmissiongridtariff", DatahubTariff.TRANSMISSION_GRID_TARIFF),
         ELECTRICITY_TAX("electricitytax", DatahubTariff.ELECTRICITY_TAX),
-        REDUCED_ELECTRICITY_TAX("reducedelectricitytax", DatahubTariff.REDUCED_ELECTRICITY_TAX),
-        TRANSMISSION_NET_TARIFF("transmissionnettariff", DatahubTariff.TRANSMISSION_NET_TARIFF);
+        REDUCED_ELECTRICITY_TAX("reducedelectricitytax", DatahubTariff.REDUCED_ELECTRICITY_TAX);
 
         private static final Map<String, PriceComponent> NAME_MAP = Stream.of(values())
                 .collect(Collectors.toMap(PriceComponent::toString, Function.identity()));
index 07a248939d7581e8be14199b1c49a87984b6ed4d..63de9d63802c48e5a5ceef08a54c7af9a1facd64 100644 (file)
@@ -71,7 +71,7 @@ public class DatahubTariffFilterFactory {
     public static final LocalDate RADIUS_CUTOFF_DATE = LocalDate.of(2023, 1, 1);
     public static final LocalDate KONSTANT_CUTOFF_DATE = LocalDate.of(2023, 2, 1);
 
-    public static DatahubTariffFilter getNetTariffByGLN(String globalLocationNumber) {
+    public static DatahubTariffFilter getGridTariffByGLN(String globalLocationNumber) {
         switch (globalLocationNumber) {
             case GLN_AAL_ELNET:
                 return new DatahubTariffFilter(Set.of(ChargeTypeCode.of("AAL-NT-05"), ChargeTypeCode.of("AAL-NTR05")),
@@ -167,6 +167,11 @@ public class DatahubTariffFilterFactory {
                 DateQueryParameter.of(ENERGINET_CUTOFF_DATE));
     }
 
+    public static DatahubTariffFilter getTransmissionGridTariff() {
+        return new DatahubTariffFilter(Set.of(), Set.of(NOTE_TRANSMISSION_NET_TARIFF),
+                DateQueryParameter.of(ENERGINET_CUTOFF_DATE));
+    }
+
     public static DatahubTariffFilter getElectricityTax() {
         return new DatahubTariffFilter(Set.of(), Set.of(NOTE_ELECTRICITY_TAX),
                 DateQueryParameter.of(ENERGINET_CUTOFF_DATE));
@@ -176,9 +181,4 @@ public class DatahubTariffFilterFactory {
         return new DatahubTariffFilter(Set.of(), Set.of(NOTE_REDUCED_ELECTRICITY_TAX),
                 DateQueryParameter.of(LocalDate.of(2021, 2, 1)));
     }
-
-    public static DatahubTariffFilter getTransmissionNetTariff() {
-        return new DatahubTariffFilter(Set.of(), Set.of(NOTE_TRANSMISSION_NET_TARIFF),
-                DateQueryParameter.of(ENERGINET_CUTOFF_DATE));
-    }
 }
index 2a71212972c21f0fba5ed38f3c3f7659b255886a..ca686821fb6b0c55bd6e042f280841fcab5b3b0f 100644 (file)
@@ -95,8 +95,9 @@ public class EnergiDataServiceHandler extends BaseThingHandler {
     private @Nullable ScheduledFuture<?> priceUpdateFuture;
 
     private record Price(String hourStart, BigDecimal spotPrice, String spotPriceCurrency,
-            @Nullable BigDecimal netTariff, @Nullable BigDecimal systemTariff, @Nullable BigDecimal electricityTax,
-            @Nullable BigDecimal reducedElectricityTax, @Nullable BigDecimal transmissionNetTariff) {
+            @Nullable BigDecimal gridTariff, @Nullable BigDecimal systemTariff,
+            @Nullable BigDecimal transmissionGridTariff, @Nullable BigDecimal electricityTax,
+            @Nullable BigDecimal reducedElectricityTax) {
     }
 
     public EnergiDataServiceHandler(Thing thing, HttpClient httpClient, TimeZoneProvider timeZoneProvider) {
@@ -236,7 +237,7 @@ public class EnergiDataServiceHandler extends BaseThingHandler {
 
     private void downloadTariffs(DatahubTariff datahubTariff) throws InterruptedException, DataServiceException {
         GlobalLocationNumber globalLocationNumber = switch (datahubTariff) {
-            case NET_TARIFF -> config.getGridCompanyGLN();
+            case GRID_TARIFF -> config.getGridCompanyGLN();
             default -> config.getEnerginetGLN();
         };
         if (globalLocationNumber.isEmpty()) {
@@ -247,11 +248,11 @@ public class EnergiDataServiceHandler extends BaseThingHandler {
             cacheManager.updateTariffs(datahubTariff);
         } else {
             DatahubTariffFilter filter = switch (datahubTariff) {
-                case NET_TARIFF -> getNetTariffFilter();
+                case GRID_TARIFF -> getGridTariffFilter();
                 case SYSTEM_TARIFF -> DatahubTariffFilterFactory.getSystemTariff();
+                case TRANSMISSION_GRID_TARIFF -> DatahubTariffFilterFactory.getTransmissionGridTariff();
                 case ELECTRICITY_TAX -> DatahubTariffFilterFactory.getElectricityTax();
                 case REDUCED_ELECTRICITY_TAX -> DatahubTariffFilterFactory.getReducedElectricityTax();
-                case TRANSMISSION_NET_TARIFF -> DatahubTariffFilterFactory.getTransmissionNetTariff();
             };
             cacheManager.putTariffs(datahubTariff, downloadPriceLists(globalLocationNumber, filter));
         }
@@ -267,24 +268,24 @@ public class EnergiDataServiceHandler extends BaseThingHandler {
         return records;
     }
 
-    private DatahubTariffFilter getNetTariffFilter() {
-        Channel channel = getThing().getChannel(CHANNEL_NET_TARIFF);
+    private DatahubTariffFilter getGridTariffFilter() {
+        Channel channel = getThing().getChannel(CHANNEL_GRID_TARIFF);
         if (channel == null) {
-            return DatahubTariffFilterFactory.getNetTariffByGLN(config.gridCompanyGLN);
+            return DatahubTariffFilterFactory.getGridTariffByGLN(config.gridCompanyGLN);
         }
 
         DatahubPriceConfiguration datahubPriceConfiguration = channel.getConfiguration()
                 .as(DatahubPriceConfiguration.class);
 
         if (!datahubPriceConfiguration.hasAnyFilterOverrides()) {
-            return DatahubTariffFilterFactory.getNetTariffByGLN(config.gridCompanyGLN);
+            return DatahubTariffFilterFactory.getGridTariffByGLN(config.gridCompanyGLN);
         }
 
         DateQueryParameter start = datahubPriceConfiguration.getStart();
         if (start == null) {
             logger.warn("Invalid channel configuration parameter 'start' or 'offset': {} (offset: {})",
                     datahubPriceConfiguration.start, datahubPriceConfiguration.offset);
-            return DatahubTariffFilterFactory.getNetTariffByGLN(config.gridCompanyGLN);
+            return DatahubTariffFilterFactory.getGridTariffByGLN(config.gridCompanyGLN);
         }
 
         Set<ChargeTypeCode> chargeTypeCodes = datahubPriceConfiguration.getChargeTypeCodes();
@@ -295,7 +296,7 @@ public class EnergiDataServiceHandler extends BaseThingHandler {
             filter = new DatahubTariffFilter(chargeTypeCodes, notes, start);
         } else {
             // Only override start date in pre-configured filter.
-            filter = new DatahubTariffFilter(DatahubTariffFilterFactory.getNetTariffByGLN(config.gridCompanyGLN),
+            filter = new DatahubTariffFilter(DatahubTariffFilterFactory.getGridTariffByGLN(config.gridCompanyGLN),
                     start);
         }
 
@@ -341,13 +342,14 @@ public class EnergiDataServiceHandler extends BaseThingHandler {
         int i = 0;
         for (Entry<Instant, BigDecimal> sourcePrice : sourcePrices) {
             Instant hourStart = sourcePrice.getKey();
-            BigDecimal netTariff = cacheManager.getTariff(DatahubTariff.NET_TARIFF, hourStart);
+            BigDecimal gridTariff = cacheManager.getTariff(DatahubTariff.GRID_TARIFF, hourStart);
             BigDecimal systemTariff = cacheManager.getTariff(DatahubTariff.SYSTEM_TARIFF, hourStart);
+            BigDecimal transmissionGridTariff = cacheManager.getTariff(DatahubTariff.TRANSMISSION_GRID_TARIFF,
+                    hourStart);
             BigDecimal electricityTax = cacheManager.getTariff(DatahubTariff.ELECTRICITY_TAX, hourStart);
             BigDecimal reducedElectricityTax = cacheManager.getTariff(DatahubTariff.REDUCED_ELECTRICITY_TAX, hourStart);
-            BigDecimal transmissionNetTariff = cacheManager.getTariff(DatahubTariff.TRANSMISSION_NET_TARIFF, hourStart);
-            targetPrices[i++] = new Price(hourStart.toString(), sourcePrice.getValue(), config.currencyCode, netTariff,
-                    systemTariff, electricityTax, reducedElectricityTax, transmissionNetTariff);
+            targetPrices[i++] = new Price(hourStart.toString(), sourcePrice.getValue(), config.currencyCode, gridTariff,
+                    systemTariff, electricityTax, reducedElectricityTax, transmissionGridTariff);
         }
         updateState(CHANNEL_HOURLY_PRICES, new StringType(gson.toJson(targetPrices)));
     }
index b274c96e76d428a176faeb2c68b3c219ad988e53..ee8aa84ac78c1ae850256fb0354d28eb5934d87e 100644 (file)
@@ -60,16 +60,16 @@ channel-group-type.energidataservice.electricity.label = Electricity
 channel-group-type.energidataservice.electricity.description = Channels related to electricity
 channel-group-type.energidataservice.electricity.channel.electricity-tax.label = Electricity Tax
 channel-group-type.energidataservice.electricity.channel.electricity-tax.description = Current electricity tax in DKK per kWh.
-channel-group-type.energidataservice.electricity.channel.net-tariff.label = Net Tariff
-channel-group-type.energidataservice.electricity.channel.net-tariff.description = Current net tariff in DKK per kWh.
+channel-group-type.energidataservice.electricity.channel.grid-tariff.label = Grid Tariff
+channel-group-type.energidataservice.electricity.channel.grid-tariff.description = Current grid tariff in DKK per kWh.
 channel-group-type.energidataservice.electricity.channel.reduced-electricity-tax.label = Reduced Electricity Tax
 channel-group-type.energidataservice.electricity.channel.reduced-electricity-tax.description = Current reduced electricity tax in DKK per kWh. For electric heating customers only.
 channel-group-type.energidataservice.electricity.channel.spot-price.label = Spot Price
 channel-group-type.energidataservice.electricity.channel.spot-price.description = Current spot price in DKK or EUR per kWh.
 channel-group-type.energidataservice.electricity.channel.system-tariff.label = System Tariff
 channel-group-type.energidataservice.electricity.channel.system-tariff.description = Current system tariff in DKK per kWh.
-channel-group-type.energidataservice.electricity.channel.transmission-net-tariff.label = Transmission Net Tariff
-channel-group-type.energidataservice.electricity.channel.transmission-net-tariff.description = Current transmission net tariff in DKK per kWh.
+channel-group-type.energidataservice.electricity.channel.transmission-grid-tariff.label = Transmission Grid Tariff
+channel-group-type.energidataservice.electricity.channel.transmission-grid-tariff.description = Current transmission grid tariff in DKK per kWh.
 
 # channel types
 
index c978b03667b3d3f159ca0269ea2952a864180a18..83587c1e46a674aeee8019e40dd2a4795d98ad91 100644 (file)
                                <label>Spot Price</label>
                                <description>Current spot price in DKK or EUR per kWh.</description>
                        </channel>
-                       <channel id="net-tariff" typeId="datahub-price">
-                               <label>Net Tariff</label>
-                               <description>Current net tariff in DKK per kWh.</description>
+                       <channel id="grid-tariff" typeId="datahub-price">
+                               <label>Grid Tariff</label>
+                               <description>Current grid tariff in DKK per kWh.</description>
                        </channel>
                        <channel id="system-tariff" typeId="datahub-price">
                                <label>System Tariff</label>
                                <description>Current system tariff in DKK per kWh.</description>
                        </channel>
+                       <channel id="transmission-grid-tariff" typeId="datahub-price">
+                               <label>Transmission Grid Tariff</label>
+                               <description>Current transmission grid tariff in DKK per kWh.</description>
+                       </channel>
                        <channel id="electricity-tax" typeId="datahub-price">
                                <label>Electricity Tax</label>
                                <description>Current electricity tax in DKK per kWh.</description>
                                <label>Reduced Electricity Tax</label>
                                <description>Current reduced electricity tax in DKK per kWh. For electric heating customers only.</description>
                        </channel>
-                       <channel id="transmission-net-tariff" typeId="datahub-price">
-                               <label>Transmission Net Tariff</label>
-                               <description>Current transmission net tariff in DKK per kWh.</description>
-                       </channel>
                        <channel id="hourly-prices" typeId="hourly-prices"/>
                </channels>
        </channel-group-type>
index b69ef51aa8e1393eaaca1e75df6fb7969361196a..805510a68eab83b84a961bfd7cae3d597816f62a 100644 (file)
@@ -14,7 +14,7 @@
                </channel-groups>
 
                <properties>
-                       <property name="thingTypeVersion">1</property>
+                       <property name="thingTypeVersion">2</property>
                </properties>
 
                <config-description-ref uri="thing-type:energidataservice:service"/>
index 62e288807ab46856d57e4fc6b8cd02b35b981c2a..ef4dd6bd99184324e2c35bd244e2ee0970885320 100644 (file)
                        </add-channel>
                </instruction-set>
 
+               <instruction-set targetVersion="2">
+                       <add-channel id="grid-tariff" groupIds="electricity">
+                               <type>energidataservice:datahub-price</type>
+                               <label>Grid Tariff</label>
+                               <description>Current grid tariff in DKK per kWh.</description>
+                       </add-channel>
+                       <add-channel id="transmission-grid-tariff" groupIds="electricity">
+                               <type>energidataservice:datahub-price</type>
+                               <label>Transmission Grid Tariff</label>
+                               <description>Current transmission grid tariff in DKK per kWh.</description>
+                       </add-channel>
+                       <remove-channel id="net-tariff" groupIds="electricity"/>
+                       <remove-channel id="transmission-net-tariff" groupIds="electricity"/>
+               </instruction-set>
+
        </thing-type>
 
 </update:update-descriptions>
index c2dbfda85bba961593561ce5ee60800a745b0c19..d1ed9ae9d2828776b4108e8e58283000151705e8 100644 (file)
@@ -109,10 +109,10 @@ public class EnergiDataServiceActionsTest {
     }
 
     @Test
-    void getPricesNetTariff() throws IOException {
+    void getPricesGridTariff() throws IOException {
         mockCommonDatasets(actions);
 
-        Map<Instant, BigDecimal> actual = actions.getPrices("NetTariff");
+        Map<Instant, BigDecimal> actual = actions.getPrices("GridTariff");
         assertThat(actual.size(), is(60));
         assertThat(actual.get(Instant.parse("2023-02-04T12:00:00Z")), is(equalTo(new BigDecimal("0.432225"))));
         assertThat(actual.get(Instant.parse("2023-02-04T16:00:00Z")), is(equalTo(new BigDecimal("1.05619"))));
@@ -139,30 +139,30 @@ public class EnergiDataServiceActionsTest {
     }
 
     @Test
-    void getPricesTransmissionNetTariff() throws IOException {
+    void getPricesTransmissionGridTariff() throws IOException {
         mockCommonDatasets(actions);
 
-        Map<Instant, BigDecimal> actual = actions.getPrices("TransmissionNetTariff");
+        Map<Instant, BigDecimal> actual = actions.getPrices("TransmissionGridTariff");
         assertThat(actual.size(), is(60));
         assertThat(actual.get(Instant.parse("2023-02-04T12:00:00Z")), is(equalTo(new BigDecimal("0.058"))));
         assertThat(actual.get(Instant.parse("2023-02-04T16:00:00Z")), is(equalTo(new BigDecimal("0.058"))));
     }
 
     @Test
-    void getPricesSpotPriceNetTariff() throws IOException {
+    void getPricesSpotPriceGridTariff() throws IOException {
         mockCommonDatasets(actions);
 
-        Map<Instant, BigDecimal> actual = actions.getPrices("SpotPrice,NetTariff");
+        Map<Instant, BigDecimal> actual = actions.getPrices("SpotPrice,GridTariff");
         assertThat(actual.size(), is(35));
         assertThat(actual.get(Instant.parse("2023-02-04T12:00:00Z")), is(equalTo(new BigDecimal("1.425065027"))));
         assertThat(actual.get(Instant.parse("2023-02-04T16:00:00Z")), is(equalTo(new BigDecimal("2.323870054"))));
     }
 
     @Test
-    void getPricesSpotPriceNetTariffElectricityTax() throws IOException {
+    void getPricesSpotPriceGridTariffElectricityTax() throws IOException {
         mockCommonDatasets(actions);
 
-        Map<Instant, BigDecimal> actual = actions.getPrices("SpotPrice,NetTariff,ElectricityTax");
+        Map<Instant, BigDecimal> actual = actions.getPrices("SpotPrice,GridTariff,ElectricityTax");
         assertThat(actual.size(), is(35));
         assertThat(actual.get(Instant.parse("2023-02-04T12:00:00Z")), is(equalTo(new BigDecimal("1.433065027"))));
         assertThat(actual.get(Instant.parse("2023-02-04T16:00:00Z")), is(equalTo(new BigDecimal("2.331870054"))));
@@ -202,7 +202,7 @@ public class EnergiDataServiceActionsTest {
         mockCommonDatasets(actions);
 
         Map<Instant, BigDecimal> actual = actions
-                .getPrices("spotprice,nettariff,systemtariff,electricitytax,transmissionnettariff");
+                .getPrices("spotprice,gridtariff,systemtariff,electricitytax,transmissiongridtariff");
         assertThat(actual.size(), is(35));
         assertThat(actual.get(Instant.parse("2023-02-04T12:00:00Z")), is(equalTo(new BigDecimal("1.545065027"))));
         assertThat(actual.get(Instant.parse("2023-02-04T15:00:00Z")), is(equalTo(new BigDecimal("1.708765039"))));
@@ -213,7 +213,7 @@ public class EnergiDataServiceActionsTest {
     void getPricesInvalidPriceComponent() throws IOException {
         mockCommonDatasets(actions);
 
-        Map<Instant, BigDecimal> actual = actions.getPrices("spotprice,nettarif");
+        Map<Instant, BigDecimal> actual = actions.getPrices("spotprice,gridtarif");
         assertThat(actual.size(), is(0));
     }
 
@@ -222,7 +222,7 @@ public class EnergiDataServiceActionsTest {
         mockCommonDatasets(actions);
         when(handler.getCurrency()).thenReturn(EnergiDataServiceBindingConstants.CURRENCY_EUR);
 
-        Map<Instant, BigDecimal> actual = actions.getPrices("spotprice,nettariff");
+        Map<Instant, BigDecimal> actual = actions.getPrices("spotprice,gridtariff");
         assertThat(actual.size(), is(0));
     }
 
@@ -404,8 +404,8 @@ public class EnergiDataServiceActionsTest {
 
         PriceListParser priceListParser = new PriceListParser(
                 Clock.fixed(spotPriceRecords[0].hourStart, EnergiDataServiceBindingConstants.DATAHUB_TIMEZONE));
-        DatahubPricelistRecords datahubRecords = getObjectFromJson("NetTariffs.json", DatahubPricelistRecords.class);
-        Map<Instant, BigDecimal> netTariffs = priceListParser
+        DatahubPricelistRecords datahubRecords = getObjectFromJson("GridTariffs.json", DatahubPricelistRecords.class);
+        Map<Instant, BigDecimal> gridTariffs = priceListParser
                 .toHourly(Arrays.stream(datahubRecords.records()).toList());
         datahubRecords = getObjectFromJson("SystemTariffs.json", DatahubPricelistRecords.class);
         Map<Instant, BigDecimal> systemTariffs = priceListParser
@@ -416,16 +416,16 @@ public class EnergiDataServiceActionsTest {
         datahubRecords = getObjectFromJson("ReducedElectricityTaxes.json", DatahubPricelistRecords.class);
         Map<Instant, BigDecimal> reducedElectricityTaxes = priceListParser
                 .toHourly(Arrays.stream(datahubRecords.records()).toList());
-        datahubRecords = getObjectFromJson("TransmissionNetTariffs.json", DatahubPricelistRecords.class);
-        Map<Instant, BigDecimal> transmissionNetTariffs = priceListParser
+        datahubRecords = getObjectFromJson("TransmissionGridTariffs.json", DatahubPricelistRecords.class);
+        Map<Instant, BigDecimal> transmissionGridTariffs = priceListParser
                 .toHourly(Arrays.stream(datahubRecords.records()).toList());
 
         when(handler.getSpotPrices()).thenReturn(spotPrices);
-        when(handler.getTariffs(DatahubTariff.NET_TARIFF)).thenReturn(netTariffs);
+        when(handler.getTariffs(DatahubTariff.GRID_TARIFF)).thenReturn(gridTariffs);
         when(handler.getTariffs(DatahubTariff.SYSTEM_TARIFF)).thenReturn(systemTariffs);
+        when(handler.getTariffs(DatahubTariff.TRANSMISSION_GRID_TARIFF)).thenReturn(transmissionGridTariffs);
         when(handler.getTariffs(DatahubTariff.ELECTRICITY_TAX)).thenReturn(electricityTaxes);
         when(handler.getTariffs(DatahubTariff.REDUCED_ELECTRICITY_TAX)).thenReturn(reducedElectricityTaxes);
-        when(handler.getTariffs(DatahubTariff.TRANSMISSION_NET_TARIFF)).thenReturn(transmissionNetTariffs);
         when(handler.getCurrency()).thenReturn(EnergiDataServiceBindingConstants.CURRENCY_DKK);
         when(handler.isReducedElectricityTax()).thenReturn(isReducedElectricityTax);
         actions.setThingHandler(handler);
diff --git a/bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/GridTariffs.json b/bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/GridTariffs.json
new file mode 100644 (file)
index 0000000..c024f6a
--- /dev/null
@@ -0,0 +1,297 @@
+{
+       "total": 10,
+       "filters": "{\"ChargeType\":[\"D03\"],\"GLN_Number\":[\"5790001089030\"],\"ChargeTypeCode\":[\"CD R\",\"CD\"]}",
+       "dataset": "DatahubPricelist",
+       "records": [
+               {
+                       "ValidFrom": "2024-01-01T00:00:00",
+                       "ValidTo": null,
+                       "ChargeTypeCode": "CD",
+                       "Price1": 0.110116,
+                       "Price2": 0.110116,
+                       "Price3": 0.110116,
+                       "Price4": 0.110116,
+                       "Price5": 0.110116,
+                       "Price6": 0.110116,
+                       "Price7": 0.330349,
+                       "Price8": 0.330349,
+                       "Price9": 0.330349,
+                       "Price10": 0.330349,
+                       "Price11": 0.330349,
+                       "Price12": 0.330349,
+                       "Price13": 0.330349,
+                       "Price14": 0.330349,
+                       "Price15": 0.330349,
+                       "Price16": 0.330349,
+                       "Price17": 0.330349,
+                       "Price18": 0.991048,
+                       "Price19": 0.991048,
+                       "Price20": 0.991048,
+                       "Price21": 0.991048,
+                       "Price22": 0.330349,
+                       "Price23": 0.330349,
+                       "Price24": 0.330349
+               },
+               {
+                       "ValidFrom": "2023-10-01T00:00:00",
+                       "ValidTo": "2024-01-01T00:00:00",
+                       "ChargeTypeCode": "CD",
+                       "Price1": 0.2204,
+                       "Price2": 0.2204,
+                       "Price3": 0.2204,
+                       "Price4": 0.2204,
+                       "Price5": 0.2204,
+                       "Price6": 0.2204,
+                       "Price7": 0.2204,
+                       "Price8": 0.2204,
+                       "Price9": 0.2204,
+                       "Price10": 0.2204,
+                       "Price11": 0.2204,
+                       "Price12": 0.2204,
+                       "Price13": 0.2204,
+                       "Price14": 0.2204,
+                       "Price15": 0.2204,
+                       "Price16": 0.2204,
+                       "Price17": 0.2204,
+                       "Price18": 0.617052,
+                       "Price19": 0.617052,
+                       "Price20": 0.617052,
+                       "Price21": 0.2204,
+                       "Price22": 0.2204,
+                       "Price23": 0.2204,
+                       "Price24": 0.2204
+               },
+               {
+                       "ValidFrom": "2023-08-01T00:00:00",
+                       "ValidTo": "2023-10-01T00:00:00",
+                       "ChargeTypeCode": "CD",
+                       "Price1": 0.2204,
+                       "Price2": 0.2204,
+                       "Price3": 0.2204,
+                       "Price4": 0.2204,
+                       "Price5": 0.2204,
+                       "Price6": 0.2204,
+                       "Price7": 0.2204,
+                       "Price8": 0.2204,
+                       "Price9": 0.2204,
+                       "Price10": 0.2204,
+                       "Price11": 0.2204,
+                       "Price12": 0.2204,
+                       "Price13": 0.2204,
+                       "Price14": 0.2204,
+                       "Price15": 0.2204,
+                       "Price16": 0.2204,
+                       "Price17": 0.2204,
+                       "Price18": 0.2204,
+                       "Price19": 0.2204,
+                       "Price20": 0.2204,
+                       "Price21": 0.2204,
+                       "Price22": 0.2204,
+                       "Price23": 0.2204,
+                       "Price24": 0.2204
+               },
+               {
+                       "ValidFrom": "2023-05-01T00:00:00",
+                       "ValidTo": "2023-08-01T00:00:00",
+                       "ChargeTypeCode": "CD",
+                       "Price1": 0.326799,
+                       "Price2": 0.326799,
+                       "Price3": 0.326799,
+                       "Price4": 0.326799,
+                       "Price5": 0.326799,
+                       "Price6": 0.326799,
+                       "Price7": 0.326799,
+                       "Price8": 0.326799,
+                       "Price9": 0.326799,
+                       "Price10": 0.326799,
+                       "Price11": 0.326799,
+                       "Price12": 0.326799,
+                       "Price13": 0.326799,
+                       "Price14": 0.326799,
+                       "Price15": 0.326799,
+                       "Price16": 0.326799,
+                       "Price17": 0.326799,
+                       "Price18": 0.326799,
+                       "Price19": 0.326799,
+                       "Price20": 0.326799,
+                       "Price21": 0.326799,
+                       "Price22": 0.326799,
+                       "Price23": 0.326799,
+                       "Price24": 0.326799
+               },
+               {
+                       "ValidFrom": "2023-04-01T00:00:00",
+                       "ValidTo": "2023-05-01T00:00:00",
+                       "ChargeTypeCode": "CD",
+                       "Price1": 0.432225,
+                       "Price2": 0.432225,
+                       "Price3": 0.432225,
+                       "Price4": 0.432225,
+                       "Price5": 0.432225,
+                       "Price6": 0.432225,
+                       "Price7": 0.432225,
+                       "Price8": 0.432225,
+                       "Price9": 0.432225,
+                       "Price10": 0.432225,
+                       "Price11": 0.432225,
+                       "Price12": 0.432225,
+                       "Price13": 0.432225,
+                       "Price14": 0.432225,
+                       "Price15": 0.432225,
+                       "Price16": 0.432225,
+                       "Price17": 0.432225,
+                       "Price18": 0.432225,
+                       "Price19": 0.432225,
+                       "Price20": 0.432225,
+                       "Price21": 0.432225,
+                       "Price22": 0.432225,
+                       "Price23": 0.432225,
+                       "Price24": 0.432225
+               },
+               {
+                       "ValidFrom": "2023-01-01T00:00:00",
+                       "ValidTo": "2023-04-01T00:00:00",
+                       "ChargeTypeCode": "CD",
+                       "Price1": 0.432225,
+                       "Price2": 0.432225,
+                       "Price3": 0.432225,
+                       "Price4": 0.432225,
+                       "Price5": 0.432225,
+                       "Price6": 0.432225,
+                       "Price7": 0.432225,
+                       "Price8": 0.432225,
+                       "Price9": 0.432225,
+                       "Price10": 0.432225,
+                       "Price11": 0.432225,
+                       "Price12": 0.432225,
+                       "Price13": 0.432225,
+                       "Price14": 0.432225,
+                       "Price15": 0.432225,
+                       "Price16": 0.432225,
+                       "Price17": 0.432225,
+                       "Price18": 1.05619,
+                       "Price19": 1.05619,
+                       "Price20": 1.05619,
+                       "Price21": 0.432225,
+                       "Price22": 0.432225,
+                       "Price23": 0.432225,
+                       "Price24": 0.432225
+               },
+               {
+                       "ValidFrom": "2024-01-01T00:00:00",
+                       "ValidTo": null,
+                       "ChargeTypeCode": "CD R",
+                       "Price1": 0.0,
+                       "Price2": 0.0,
+                       "Price3": 0.0,
+                       "Price4": 0.0,
+                       "Price5": 0.0,
+                       "Price6": 0.0,
+                       "Price7": 0.0,
+                       "Price8": 0.0,
+                       "Price9": 0.0,
+                       "Price10": 0.0,
+                       "Price11": 0.0,
+                       "Price12": 0.0,
+                       "Price13": 0.0,
+                       "Price14": 0.0,
+                       "Price15": 0.0,
+                       "Price16": 0.0,
+                       "Price17": 0.0,
+                       "Price18": 0.0,
+                       "Price19": 0.0,
+                       "Price20": 0.0,
+                       "Price21": 0.0,
+                       "Price22": 0.0,
+                       "Price23": 0.0,
+                       "Price24": 0.0
+               },
+               {
+                       "ValidFrom": "2023-10-01T00:00:00",
+                       "ValidTo": "2024-01-01T00:00:00",
+                       "ChargeTypeCode": "CD R",
+                       "Price1": -0.2204,
+                       "Price2": -0.2204,
+                       "Price3": -0.2204,
+                       "Price4": -0.2204,
+                       "Price5": -0.2204,
+                       "Price6": -0.2204,
+                       "Price7": -0.2204,
+                       "Price8": -0.2204,
+                       "Price9": -0.2204,
+                       "Price10": -0.2204,
+                       "Price11": -0.2204,
+                       "Price12": -0.2204,
+                       "Price13": -0.2204,
+                       "Price14": -0.2204,
+                       "Price15": -0.2204,
+                       "Price16": -0.2204,
+                       "Price17": -0.2204,
+                       "Price18": -0.617052,
+                       "Price19": -0.617052,
+                       "Price20": -0.617052,
+                       "Price21": -0.2204,
+                       "Price22": -0.2204,
+                       "Price23": -0.2204,
+                       "Price24": -0.2204
+               },
+               {
+                       "ValidFrom": "2023-08-01T00:00:00",
+                       "ValidTo": "2023-10-01T00:00:00",
+                       "ChargeTypeCode": "CD R",
+                       "Price1": -0.2204,
+                       "Price2": -0.2204,
+                       "Price3": -0.2204,
+                       "Price4": -0.2204,
+                       "Price5": -0.2204,
+                       "Price6": -0.2204,
+                       "Price7": -0.2204,
+                       "Price8": -0.2204,
+                       "Price9": -0.2204,
+                       "Price10": -0.2204,
+                       "Price11": -0.2204,
+                       "Price12": -0.2204,
+                       "Price13": -0.2204,
+                       "Price14": -0.2204,
+                       "Price15": -0.2204,
+                       "Price16": -0.2204,
+                       "Price17": -0.2204,
+                       "Price18": -0.2204,
+                       "Price19": -0.2204,
+                       "Price20": -0.2204,
+                       "Price21": -0.2204,
+                       "Price22": -0.2204,
+                       "Price23": -0.2204,
+                       "Price24": -0.2204
+               },
+               {
+                       "ValidFrom": "2023-01-01T00:00:00",
+                       "ValidTo": "2023-08-01T00:00:00",
+                       "ChargeTypeCode": "CD R",
+                       "Price1": 0.0,
+                       "Price2": 0.0,
+                       "Price3": 0.0,
+                       "Price4": 0.0,
+                       "Price5": 0.0,
+                       "Price6": 0.0,
+                       "Price7": 0.0,
+                       "Price8": 0.0,
+                       "Price9": 0.0,
+                       "Price10": 0.0,
+                       "Price11": 0.0,
+                       "Price12": 0.0,
+                       "Price13": 0.0,
+                       "Price14": 0.0,
+                       "Price15": 0.0,
+                       "Price16": 0.0,
+                       "Price17": 0.0,
+                       "Price18": 0.0,
+                       "Price19": 0.0,
+                       "Price20": 0.0,
+                       "Price21": 0.0,
+                       "Price22": 0.0,
+                       "Price23": 0.0,
+                       "Price24": 0.0
+               }
+       ]
+}
diff --git a/bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/NetTariffs.json b/bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/NetTariffs.json
deleted file mode 100644 (file)
index c024f6a..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-{
-       "total": 10,
-       "filters": "{\"ChargeType\":[\"D03\"],\"GLN_Number\":[\"5790001089030\"],\"ChargeTypeCode\":[\"CD R\",\"CD\"]}",
-       "dataset": "DatahubPricelist",
-       "records": [
-               {
-                       "ValidFrom": "2024-01-01T00:00:00",
-                       "ValidTo": null,
-                       "ChargeTypeCode": "CD",
-                       "Price1": 0.110116,
-                       "Price2": 0.110116,
-                       "Price3": 0.110116,
-                       "Price4": 0.110116,
-                       "Price5": 0.110116,
-                       "Price6": 0.110116,
-                       "Price7": 0.330349,
-                       "Price8": 0.330349,
-                       "Price9": 0.330349,
-                       "Price10": 0.330349,
-                       "Price11": 0.330349,
-                       "Price12": 0.330349,
-                       "Price13": 0.330349,
-                       "Price14": 0.330349,
-                       "Price15": 0.330349,
-                       "Price16": 0.330349,
-                       "Price17": 0.330349,
-                       "Price18": 0.991048,
-                       "Price19": 0.991048,
-                       "Price20": 0.991048,
-                       "Price21": 0.991048,
-                       "Price22": 0.330349,
-                       "Price23": 0.330349,
-                       "Price24": 0.330349
-               },
-               {
-                       "ValidFrom": "2023-10-01T00:00:00",
-                       "ValidTo": "2024-01-01T00:00:00",
-                       "ChargeTypeCode": "CD",
-                       "Price1": 0.2204,
-                       "Price2": 0.2204,
-                       "Price3": 0.2204,
-                       "Price4": 0.2204,
-                       "Price5": 0.2204,
-                       "Price6": 0.2204,
-                       "Price7": 0.2204,
-                       "Price8": 0.2204,
-                       "Price9": 0.2204,
-                       "Price10": 0.2204,
-                       "Price11": 0.2204,
-                       "Price12": 0.2204,
-                       "Price13": 0.2204,
-                       "Price14": 0.2204,
-                       "Price15": 0.2204,
-                       "Price16": 0.2204,
-                       "Price17": 0.2204,
-                       "Price18": 0.617052,
-                       "Price19": 0.617052,
-                       "Price20": 0.617052,
-                       "Price21": 0.2204,
-                       "Price22": 0.2204,
-                       "Price23": 0.2204,
-                       "Price24": 0.2204
-               },
-               {
-                       "ValidFrom": "2023-08-01T00:00:00",
-                       "ValidTo": "2023-10-01T00:00:00",
-                       "ChargeTypeCode": "CD",
-                       "Price1": 0.2204,
-                       "Price2": 0.2204,
-                       "Price3": 0.2204,
-                       "Price4": 0.2204,
-                       "Price5": 0.2204,
-                       "Price6": 0.2204,
-                       "Price7": 0.2204,
-                       "Price8": 0.2204,
-                       "Price9": 0.2204,
-                       "Price10": 0.2204,
-                       "Price11": 0.2204,
-                       "Price12": 0.2204,
-                       "Price13": 0.2204,
-                       "Price14": 0.2204,
-                       "Price15": 0.2204,
-                       "Price16": 0.2204,
-                       "Price17": 0.2204,
-                       "Price18": 0.2204,
-                       "Price19": 0.2204,
-                       "Price20": 0.2204,
-                       "Price21": 0.2204,
-                       "Price22": 0.2204,
-                       "Price23": 0.2204,
-                       "Price24": 0.2204
-               },
-               {
-                       "ValidFrom": "2023-05-01T00:00:00",
-                       "ValidTo": "2023-08-01T00:00:00",
-                       "ChargeTypeCode": "CD",
-                       "Price1": 0.326799,
-                       "Price2": 0.326799,
-                       "Price3": 0.326799,
-                       "Price4": 0.326799,
-                       "Price5": 0.326799,
-                       "Price6": 0.326799,
-                       "Price7": 0.326799,
-                       "Price8": 0.326799,
-                       "Price9": 0.326799,
-                       "Price10": 0.326799,
-                       "Price11": 0.326799,
-                       "Price12": 0.326799,
-                       "Price13": 0.326799,
-                       "Price14": 0.326799,
-                       "Price15": 0.326799,
-                       "Price16": 0.326799,
-                       "Price17": 0.326799,
-                       "Price18": 0.326799,
-                       "Price19": 0.326799,
-                       "Price20": 0.326799,
-                       "Price21": 0.326799,
-                       "Price22": 0.326799,
-                       "Price23": 0.326799,
-                       "Price24": 0.326799
-               },
-               {
-                       "ValidFrom": "2023-04-01T00:00:00",
-                       "ValidTo": "2023-05-01T00:00:00",
-                       "ChargeTypeCode": "CD",
-                       "Price1": 0.432225,
-                       "Price2": 0.432225,
-                       "Price3": 0.432225,
-                       "Price4": 0.432225,
-                       "Price5": 0.432225,
-                       "Price6": 0.432225,
-                       "Price7": 0.432225,
-                       "Price8": 0.432225,
-                       "Price9": 0.432225,
-                       "Price10": 0.432225,
-                       "Price11": 0.432225,
-                       "Price12": 0.432225,
-                       "Price13": 0.432225,
-                       "Price14": 0.432225,
-                       "Price15": 0.432225,
-                       "Price16": 0.432225,
-                       "Price17": 0.432225,
-                       "Price18": 0.432225,
-                       "Price19": 0.432225,
-                       "Price20": 0.432225,
-                       "Price21": 0.432225,
-                       "Price22": 0.432225,
-                       "Price23": 0.432225,
-                       "Price24": 0.432225
-               },
-               {
-                       "ValidFrom": "2023-01-01T00:00:00",
-                       "ValidTo": "2023-04-01T00:00:00",
-                       "ChargeTypeCode": "CD",
-                       "Price1": 0.432225,
-                       "Price2": 0.432225,
-                       "Price3": 0.432225,
-                       "Price4": 0.432225,
-                       "Price5": 0.432225,
-                       "Price6": 0.432225,
-                       "Price7": 0.432225,
-                       "Price8": 0.432225,
-                       "Price9": 0.432225,
-                       "Price10": 0.432225,
-                       "Price11": 0.432225,
-                       "Price12": 0.432225,
-                       "Price13": 0.432225,
-                       "Price14": 0.432225,
-                       "Price15": 0.432225,
-                       "Price16": 0.432225,
-                       "Price17": 0.432225,
-                       "Price18": 1.05619,
-                       "Price19": 1.05619,
-                       "Price20": 1.05619,
-                       "Price21": 0.432225,
-                       "Price22": 0.432225,
-                       "Price23": 0.432225,
-                       "Price24": 0.432225
-               },
-               {
-                       "ValidFrom": "2024-01-01T00:00:00",
-                       "ValidTo": null,
-                       "ChargeTypeCode": "CD R",
-                       "Price1": 0.0,
-                       "Price2": 0.0,
-                       "Price3": 0.0,
-                       "Price4": 0.0,
-                       "Price5": 0.0,
-                       "Price6": 0.0,
-                       "Price7": 0.0,
-                       "Price8": 0.0,
-                       "Price9": 0.0,
-                       "Price10": 0.0,
-                       "Price11": 0.0,
-                       "Price12": 0.0,
-                       "Price13": 0.0,
-                       "Price14": 0.0,
-                       "Price15": 0.0,
-                       "Price16": 0.0,
-                       "Price17": 0.0,
-                       "Price18": 0.0,
-                       "Price19": 0.0,
-                       "Price20": 0.0,
-                       "Price21": 0.0,
-                       "Price22": 0.0,
-                       "Price23": 0.0,
-                       "Price24": 0.0
-               },
-               {
-                       "ValidFrom": "2023-10-01T00:00:00",
-                       "ValidTo": "2024-01-01T00:00:00",
-                       "ChargeTypeCode": "CD R",
-                       "Price1": -0.2204,
-                       "Price2": -0.2204,
-                       "Price3": -0.2204,
-                       "Price4": -0.2204,
-                       "Price5": -0.2204,
-                       "Price6": -0.2204,
-                       "Price7": -0.2204,
-                       "Price8": -0.2204,
-                       "Price9": -0.2204,
-                       "Price10": -0.2204,
-                       "Price11": -0.2204,
-                       "Price12": -0.2204,
-                       "Price13": -0.2204,
-                       "Price14": -0.2204,
-                       "Price15": -0.2204,
-                       "Price16": -0.2204,
-                       "Price17": -0.2204,
-                       "Price18": -0.617052,
-                       "Price19": -0.617052,
-                       "Price20": -0.617052,
-                       "Price21": -0.2204,
-                       "Price22": -0.2204,
-                       "Price23": -0.2204,
-                       "Price24": -0.2204
-               },
-               {
-                       "ValidFrom": "2023-08-01T00:00:00",
-                       "ValidTo": "2023-10-01T00:00:00",
-                       "ChargeTypeCode": "CD R",
-                       "Price1": -0.2204,
-                       "Price2": -0.2204,
-                       "Price3": -0.2204,
-                       "Price4": -0.2204,
-                       "Price5": -0.2204,
-                       "Price6": -0.2204,
-                       "Price7": -0.2204,
-                       "Price8": -0.2204,
-                       "Price9": -0.2204,
-                       "Price10": -0.2204,
-                       "Price11": -0.2204,
-                       "Price12": -0.2204,
-                       "Price13": -0.2204,
-                       "Price14": -0.2204,
-                       "Price15": -0.2204,
-                       "Price16": -0.2204,
-                       "Price17": -0.2204,
-                       "Price18": -0.2204,
-                       "Price19": -0.2204,
-                       "Price20": -0.2204,
-                       "Price21": -0.2204,
-                       "Price22": -0.2204,
-                       "Price23": -0.2204,
-                       "Price24": -0.2204
-               },
-               {
-                       "ValidFrom": "2023-01-01T00:00:00",
-                       "ValidTo": "2023-08-01T00:00:00",
-                       "ChargeTypeCode": "CD R",
-                       "Price1": 0.0,
-                       "Price2": 0.0,
-                       "Price3": 0.0,
-                       "Price4": 0.0,
-                       "Price5": 0.0,
-                       "Price6": 0.0,
-                       "Price7": 0.0,
-                       "Price8": 0.0,
-                       "Price9": 0.0,
-                       "Price10": 0.0,
-                       "Price11": 0.0,
-                       "Price12": 0.0,
-                       "Price13": 0.0,
-                       "Price14": 0.0,
-                       "Price15": 0.0,
-                       "Price16": 0.0,
-                       "Price17": 0.0,
-                       "Price18": 0.0,
-                       "Price19": 0.0,
-                       "Price20": 0.0,
-                       "Price21": 0.0,
-                       "Price22": 0.0,
-                       "Price23": 0.0,
-                       "Price24": 0.0
-               }
-       ]
-}
diff --git a/bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/TransmissionGridTariffs.json b/bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/TransmissionGridTariffs.json
new file mode 100644 (file)
index 0000000..c2ed993
--- /dev/null
@@ -0,0 +1,36 @@
+{
+       "total": 1,
+       "filters": "{\"ChargeType\":[\"D03\"],\"GLN_Number\":[\"5790000432752\"],\"Note\":[\"Transmissions nettarif\"]}",
+       "dataset": "DatahubPricelist",
+       "records": [
+               {
+                       "ValidFrom": "2023-01-01T00:00:00",
+                       "ValidTo": null,
+                       "ChargeTypeCode": "40000",
+                       "Price1": 0.058,
+                       "Price2": null,
+                       "Price3": null,
+                       "Price4": null,
+                       "Price5": null,
+                       "Price6": null,
+                       "Price7": null,
+                       "Price8": null,
+                       "Price9": null,
+                       "Price10": null,
+                       "Price11": null,
+                       "Price12": null,
+                       "Price13": null,
+                       "Price14": null,
+                       "Price15": null,
+                       "Price16": null,
+                       "Price17": null,
+                       "Price18": null,
+                       "Price19": null,
+                       "Price20": null,
+                       "Price21": null,
+                       "Price22": null,
+                       "Price23": null,
+                       "Price24": null
+               }
+       ]
+}
diff --git a/bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/TransmissionNetTariffs.json b/bundles/org.openhab.binding.energidataservice/src/test/resources/org/openhab/binding/energidataservice/internal/action/TransmissionNetTariffs.json
deleted file mode 100644 (file)
index c2ed993..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-       "total": 1,
-       "filters": "{\"ChargeType\":[\"D03\"],\"GLN_Number\":[\"5790000432752\"],\"Note\":[\"Transmissions nettarif\"]}",
-       "dataset": "DatahubPricelist",
-       "records": [
-               {
-                       "ValidFrom": "2023-01-01T00:00:00",
-                       "ValidTo": null,
-                       "ChargeTypeCode": "40000",
-                       "Price1": 0.058,
-                       "Price2": null,
-                       "Price3": null,
-                       "Price4": null,
-                       "Price5": null,
-                       "Price6": null,
-                       "Price7": null,
-                       "Price8": null,
-                       "Price9": null,
-                       "Price10": null,
-                       "Price11": null,
-                       "Price12": null,
-                       "Price13": null,
-                       "Price14": null,
-                       "Price15": null,
-                       "Price16": null,
-                       "Price17": null,
-                       "Price18": null,
-                       "Price19": null,
-                       "Price20": null,
-                       "Price21": null,
-                       "Price22": null,
-                       "Price23": null,
-                       "Price24": null
-               }
-       ]
-}