]> git.basschouten.com Git - openhab-addons.git/blob
630fe8c0a766b1da4d493ca75c71792c90cb1356
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.airvisualnode.internal;
14
15 import java.util.Arrays;
16 import java.util.Collections;
17 import java.util.HashSet;
18 import java.util.Set;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.DefaultSystemChannelTypeProvider;
22 import org.openhab.core.thing.ThingTypeUID;
23
24 /**
25  * The {@link AirVisualNodeBindingConstants} class defines common constants, which are
26  * used across the whole binding.
27  *
28  * @author Victor Antonovich - Initial contribution
29  */
30 @NonNullByDefault
31 public class AirVisualNodeBindingConstants {
32
33     public static final String BINDING_ID = "airvisualnode";
34
35     // List of all Thing Type UIDs
36     public static final ThingTypeUID THING_TYPE_AVNODE = new ThingTypeUID(BINDING_ID, "avnode");
37
38     // List of all Channel ids
39     public static final String CHANNEL_CO2 = "co2";
40     public static final String CHANNEL_HUMIDITY = "humidity";
41     public static final String CHANNEL_AQI_US = "aqi";
42     public static final String CHANNEL_PM_25 = "pm_25";
43     public static final String CHANNEL_TEMP_CELSIUS = "temperature";
44     public static final String CHANNEL_TIMESTAMP = "timestamp";
45     public static final String CHANNEL_USED_MEMORY = "used_memory";
46     public static final String CHANNEL_BATTERY_LEVEL = DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_BATTERY_LEVEL
47             .getUID().getId();
48     public static final String CHANNEL_WIFI_STRENGTH = DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_SIGNAL_STRENGTH
49             .getUID().getId();
50
51     // List of all supported Thing UIDs
52     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
53             .unmodifiableSet(new HashSet<>(Arrays.asList(THING_TYPE_AVNODE)));
54
55     // List of all supported Channel ids
56     public static final Set<String> SUPPORTED_CHANNEL_IDS = Collections.unmodifiableSet(new HashSet<>(
57             Arrays.asList(CHANNEL_CO2, CHANNEL_HUMIDITY, CHANNEL_AQI_US, CHANNEL_PM_25, CHANNEL_TEMP_CELSIUS,
58                     CHANNEL_BATTERY_LEVEL, CHANNEL_WIFI_STRENGTH, CHANNEL_TIMESTAMP, CHANNEL_USED_MEMORY)));
59 }