]> git.basschouten.com Git - openhab-addons.git/blob
e10c883e8c79a548772294d24eb63229d1a72305
[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.dali.internal;
14
15 import java.util.Arrays;
16 import java.util.HashSet;
17 import java.util.Set;
18
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.core.thing.ThingTypeUID;
21
22 /**
23  * The {@link DaliBindingConstants} class defines common constants, which are
24  * used across the whole binding.
25  *
26  * @author Robert Schmid - Initial contribution
27  */
28 @NonNullByDefault
29 public class DaliBindingConstants {
30
31     private static final String BINDING_ID = "dali";
32
33     // List of all Thing Type UIDs
34     public static final ThingTypeUID BRIDGE_TYPE = new ThingTypeUID(BINDING_ID, "daliserver");
35     public static final ThingTypeUID THING_TYPE_DEVICE = new ThingTypeUID(BINDING_ID, "device");
36     public static final ThingTypeUID THING_TYPE_GROUP = new ThingTypeUID(BINDING_ID, "group");
37     public static final ThingTypeUID THING_TYPE_RGB = new ThingTypeUID(BINDING_ID, "rgb");
38     public static final ThingTypeUID THING_TYPE_DEVICE_DT8 = new ThingTypeUID(BINDING_ID, "device-dt8");
39     public static final ThingTypeUID THING_TYPE_GROUP_DT8 = new ThingTypeUID(BINDING_ID, "group-dt8");
40     public static final Set<ThingTypeUID> SUPPORTED_DEVICE_THING_TYPES_UIDS = new HashSet<>(Arrays
41             .asList(THING_TYPE_DEVICE, THING_TYPE_GROUP, THING_TYPE_RGB, THING_TYPE_DEVICE_DT8, THING_TYPE_GROUP_DT8));
42
43     public static final String CHANNEL_DIM_AT_FADE_RATE = "dimAtFadeRate";
44     public static final String CHANNEL_DIM_IMMEDIATELY = "dimImmediately";
45     public static final String CHANNEL_COLOR = "color";
46     public static final String CHANNEL_COLOR_TEMPERATURE = "color-temperature-abs";
47
48     public static final String TARGET_ID = "targetId";
49     public static final String READ_DEVICE_TARGET_ID = "readDeviceTargetId";
50     public static final String TARGET_ID_R = "targetIdR";
51     public static final String TARGET_ID_G = "targetIdG";
52     public static final String TARGET_ID_B = "targetIdB";
53
54     public static final int DALI_SWITCH_100_PERCENT = 254;
55 }