]> git.basschouten.com Git - openhab-addons.git/blob
72c3d3ab845a9cbde6ff7a9d0e908fd14b3bc6be
[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.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_PM_10 = "pm_10";
44     public static final String CHANNEL_PM_01 = "pm_01";
45     public static final String CHANNEL_TEMP_CELSIUS = "temperature";
46     public static final String CHANNEL_TIMESTAMP = "timestamp";
47     public static final String CHANNEL_USED_MEMORY = "used_memory";
48     public static final String CHANNEL_BATTERY_LEVEL = DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_BATTERY_LEVEL
49             .getUID().getId();
50     public static final String CHANNEL_WIFI_STRENGTH = DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_SIGNAL_STRENGTH
51             .getUID().getId();
52
53     // List of all supported Thing UIDs
54     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
55             .unmodifiableSet(new HashSet<>(Arrays.asList(THING_TYPE_AVNODE)));
56
57     // List of all supported Channel ids
58     public static final Set<String> SUPPORTED_CHANNEL_IDS = Collections
59             .unmodifiableSet(new HashSet<>(Arrays.asList(CHANNEL_CO2, CHANNEL_HUMIDITY, CHANNEL_AQI_US, CHANNEL_PM_25,
60                     CHANNEL_PM_10, CHANNEL_PM_01, CHANNEL_TEMP_CELSIUS, CHANNEL_BATTERY_LEVEL, CHANNEL_WIFI_STRENGTH,
61                     CHANNEL_TIMESTAMP, CHANNEL_USED_MEMORY)));
62 }