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.digitalstrom.internal.lib.structure.devices.deviceparameters.constants;
15 import java.util.Arrays;
16 import java.util.List;
19 * The {@link MeteringTypeEnum} lists all available digitalSTROM metering types.
21 * @author Alexander Betker - Initial contribution
22 * @author Michael Ochel - add MeteringUnitEnum list
23 * @author Matthias Siegele - add MeteringUnitEnum list
25 public enum MeteringTypeEnum {
26 ENERGY(Arrays.asList(MeteringUnitsEnum.WH, MeteringUnitsEnum.WS)),
27 // currently null by request getLast
28 // energyDelta(Lists.newArrayList(MeteringUnitsEnum.Wh, MeteringUnitsEnum.Ws)),
29 CONSUMPTION(Arrays.asList(MeteringUnitsEnum.WH));
31 private final List<MeteringUnitsEnum> meteringUnits;
33 private MeteringTypeEnum(List<MeteringUnitsEnum> meteringUnits) {
34 this.meteringUnits = meteringUnits;
38 * Returns the available units as {@link List} for this {@link MeteringTypeEnum}.
42 public List<MeteringUnitsEnum> getMeteringUnitList() {