2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.energidataservice.internal.config;
15 import java.util.Currency;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.energidataservice.internal.EnergiDataServiceBindingConstants;
19 import org.openhab.binding.energidataservice.internal.api.GlobalLocationNumber;
22 * The {@link EnergiDataServiceConfiguration} class contains fields mapping thing configuration parameters.
24 * @author Jacob Laursen - Initial contribution
27 public class EnergiDataServiceConfiguration {
30 * Price area (DK1 = West of the Great Belt, DK2 = East of the Great Belt).
32 public String priceArea = "";
35 * Currency code for the prices.
37 public String currencyCode = EnergiDataServiceBindingConstants.CURRENCY_DKK.getCurrencyCode();
40 * Global Location Number of the Grid Company.
42 public String gridCompanyGLN = "";
45 * Global Location Number of Energinet.
47 public String energinetGLN = "5790000432752";
50 * Reduced electricity tax applies.
51 * For electric heating customers only.
53 public boolean reducedElectricityTax;
56 * Get {@link Currency} representing the configured currency code.
58 * @return Currency instance
60 public Currency getCurrency() {
61 return Currency.getInstance(currencyCode);
64 public GlobalLocationNumber getGridCompanyGLN() {
65 return GlobalLocationNumber.of(gridCompanyGLN);
68 public GlobalLocationNumber getEnerginetGLN() {
69 return GlobalLocationNumber.of(energinetGLN);