]> git.basschouten.com Git - openhab-addons.git/blob
f9c3106a414dc79b01cc8167931b355d9d61a80c
[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.wled.internal;
14
15 import java.math.BigDecimal;
16 import java.util.Set;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link WLedBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Matthew Skinner - Initial contribution
26  */
27 @NonNullByDefault
28 public class WLedBindingConstants {
29
30     public static final String BINDING_ID = "wled";
31     public static final String BRIDGE_TYPE_ID = "json";
32     public static final BigDecimal BIG_DECIMAL_2_55 = new BigDecimal(2.55);
33     public static final BigDecimal BIG_DECIMAL_182_04 = new BigDecimal(182.04);
34
35     // List of all Thing Type UIDs
36     public static final ThingTypeUID THING_TYPE_SEGMENT = new ThingTypeUID(BINDING_ID, "segment");
37     public static final ThingTypeUID THING_TYPE_JSON = new ThingTypeUID(BINDING_ID, BRIDGE_TYPE_ID);
38     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Set.of(THING_TYPE_SEGMENT, THING_TYPE_JSON);
39
40     // Configs
41     public static final String CONFIG_ADDRESS = "address";
42     public static final String CONFIG_POLL_TIME = "pollTime";
43     public static final String CONFIG_SEGMENT_INDEX = "segmentIndex";
44     public static final String CONFIG_SAT_THRESHOLD = "saturationThreshold";
45
46     // Channels
47     public static final String CHANNEL_GLOBAL_BRIGHTNESS = "globalBrightness";
48     public static final String CHANNEL_MASTER_CONTROLS = "masterControls";
49     public static final String CHANNEL_SEGMENT_BRIGHTNESS = "segmentBrightness";
50     public static final String CHANNEL_PRIMARY_COLOR = "primaryColor";
51     public static final String CHANNEL_SECONDARY_COLOR = "secondaryColor";
52     public static final String CHANNEL_THIRD_COLOR = "tertiaryColor";
53     public static final String CHANNEL_PRIMARY_WHITE = "primaryWhite";
54     public static final String CHANNEL_SECONDARY_WHITE = "secondaryWhite";
55     public static final String CHANNEL_THIRD_WHITE = "tertiaryWhite";
56     public static final String CHANNEL_PALETTES = "palettes";
57     public static final String CHANNEL_PRESETS = "presets";
58     public static final String CHANNEL_PLAYLISTS = "playlists";
59     public static final String CHANNEL_PRESET_DURATION = "presetDuration";
60     public static final String CHANNEL_TRANS_TIME = "transformTime";
61     public static final String CHANNEL_PRESET_CYCLE = "presetCycle";
62     public static final String CHANNEL_FX = "fx";
63     public static final String CHANNEL_SPEED = "speed";
64     public static final String CHANNEL_INTENSITY = "intensity";
65     public static final String CHANNEL_MIRROR = "mirror";
66     public static final String CHANNEL_REVERSE = "reverse";
67     public static final String CHANNEL_GROUPING = "grouping";
68     public static final String CHANNEL_SPACING = "spacing";
69     public static final String CHANNEL_LIVE_OVERRIDE = "liveOverride";
70     public static final String CHANNEL_SLEEP = "sleep";
71     public static final String CHANNEL_SLEEP_MODE = "sleepMode";
72     public static final String CHANNEL_SLEEP_DURATION = "sleepDuration";
73     public static final String CHANNEL_SLEEP_BRIGHTNESS = "sleepTargetBrightness";
74     public static final String CHANNEL_SYNC_SEND = "syncSend";
75     public static final String CHANNEL_SYNC_RECEIVE = "syncReceive";
76 }