2 * Copyright (c) 2010-2022 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.semsportal.internal;
15 import java.util.Arrays;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
22 * The {@link SEMSPortalBindingConstants} class defines common constants, which are
23 * used across the whole binding.
25 * @author Iwan Bron - Initial contribution
28 public class SEMSPortalBindingConstants {
30 private static final String BINDING_ID = "semsportal";
31 public static final String TIME_FORMAT = "HH:mm:ss";
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");
37 // the default update interval for statusses at the portal
38 public static final int DEFAULT_UPDATE_INTERVAL_MINUTES = 5;
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";
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";
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);