]> git.basschouten.com Git - openhab-addons.git/blob
7d40e5577c73474d6ad1c3f0fd29cd606e8bb7c5
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.semsportal.internal;
14
15 import java.util.Arrays;
16 import java.util.List;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link SEMSPortalBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Iwan Bron - Initial contribution
26  */
27 @NonNullByDefault
28 public class SEMSPortalBindingConstants {
29
30     private static final String BINDING_ID = "semsportal";
31     public static final String TIME_FORMAT = "HH:mm:ss";
32
33     // List of all Thing Type UIDs
34     public static final ThingTypeUID THING_TYPE_PORTAL = new ThingTypeUID(BINDING_ID, "portal");
35     public static final ThingTypeUID THING_TYPE_STATION = new ThingTypeUID(BINDING_ID, "station");
36
37     // the default update interval for statusses at the portal
38     public static final int DEFAULT_UPDATE_INTERVAL_MINUTES = 5;
39
40     // station properties
41     public static final String STATION_UUID = "stationUUID";
42     public static final String STATION_NAME = "stationName";
43     public static final String STATION_CAPACITY = "stationCapacity";
44     public static final String STATION_REPRESENTATION_PROPERTY = STATION_UUID;
45     public static final String STATION_LABEL_FORMAT = "Power Station %s";
46
47     // List of all Channel ids
48     public static final String CHANNEL_CURRENT_OUTPUT = "currentOutput";
49     public static final String CHANNEL_LASTUPDATE = "lastUpdate";
50     public static final String CHANNEL_TODAY_TOTAL = "todayTotal";
51     public static final String CHANNEL_MONTH_TOTAL = "monthTotal";
52     public static final String CHANNEL_OVERALL_TOTAL = "overallTotal";
53     public static final String CHANNEL_TODAY_INCOME = "todayIncome";
54     public static final String CHANNEL_TOTAL_INCOME = "totalIncome";
55
56     protected static final List<String> ALL_CHANNELS = Arrays.asList(CHANNEL_LASTUPDATE, CHANNEL_CURRENT_OUTPUT,
57             CHANNEL_TODAY_TOTAL, CHANNEL_MONTH_TOTAL, CHANNEL_OVERALL_TOTAL, CHANNEL_TODAY_INCOME,
58             CHANNEL_TOTAL_INCOME);
59 }