2 * Copyright (c) 2010-2020 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.airvisualnode.internal;
15 import java.util.Arrays;
16 import java.util.Collections;
17 import java.util.HashSet;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.DefaultSystemChannelTypeProvider;
22 import org.openhab.core.thing.ThingTypeUID;
25 * The {@link AirVisualNodeBindingConstants} class defines common constants, which are
26 * used across the whole binding.
28 * @author Victor Antonovich - Initial contribution
31 public class AirVisualNodeBindingConstants {
33 public static final String BINDING_ID = "airvisualnode";
35 // List of all Thing Type UIDs
36 public static final ThingTypeUID THING_TYPE_AVNODE = new ThingTypeUID(BINDING_ID, "avnode");
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
48 public static final String CHANNEL_WIFI_STRENGTH = DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_SIGNAL_STRENGTH
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)));
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)));