]> git.basschouten.com Git - openhab-addons.git/blob
858f4d2c3da53f3fdcc99f8864cddd47a6e17fd1
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.iammeter.internal;
14
15 import javax.measure.Unit;
16
17 import org.openhab.core.library.unit.Units;
18
19 /**
20  * The {@link IammeterWEM3080TChannel} Enum defines common constants, which are
21  * used across the whole binding.
22  *
23  * @author Yang Bo - Initial contribution
24  */
25 public enum IammeterWEM3080TChannel {
26
27     CHANNEL_VOLTAGE("voltage", Units.VOLT),
28     CHANNEL_CURRENT("current", Units.AMPERE),
29     CHANNEL_POWER("power", Units.WATT),
30     CHANNEL_IMPORTENERGY("importenergy", Units.KILOWATT_HOUR),
31     CHANNEL_EXPORTGRID("exportgrid", Units.KILOWATT_HOUR),
32     CHANNEL_FREQUENCY("frequency", Units.HERTZ),
33     CHANNEL_PF("pf", Units.HERTZ);
34
35     private final String id;
36     private final Unit<?> unit;
37
38     IammeterWEM3080TChannel(String id, Unit<?> unit) {
39         this.id = id;
40         this.unit = unit;
41     }
42
43     public String getId() {
44         return id;
45     }
46
47     public Unit<?> getUnit() {
48         return unit;
49     }
50 }