]> git.basschouten.com Git - openhab-addons.git/blob
1050ec3eafdc1b826c8733b164ee39eab7947f95
[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.tplinksmarthome.internal;
14
15 import static org.openhab.binding.tplinksmarthome.internal.TPLinkSmartHomeBindingConstants.*;
16 import static org.openhab.binding.tplinksmarthome.internal.TPLinkSmartHomeThingType.*;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ChannelUID;
20 import org.openhab.core.thing.ThingUID;
21
22 /**
23  *
24  * @author Hilbrand Bouwkamp - Initial contribution
25  */
26 @NonNullByDefault
27 public final class ChannelUIDConstants {
28
29     public static final ChannelUID CHANNEL_UID_BRIGHTNESS = createChannel(LB130, CHANNEL_BRIGHTNESS);
30     public static final ChannelUID CHANNEL_UID_COLOR = createChannel(LB130, CHANNEL_COLOR);
31     public static final ChannelUID CHANNEL_UID_COLOR_TEMPERATURE = createChannel(LB130, CHANNEL_COLOR_TEMPERATURE);
32     public static final ChannelUID CHANNEL_UID_COLOR_TEMPERATURE_ABS = createChannel(LB130,
33             CHANNEL_COLOR_TEMPERATURE_ABS);
34     public static final ChannelUID CHANNEL_UID_ENERGY_CURRENT = createChannel(HS110, CHANNEL_ENERGY_CURRENT);
35     public static final ChannelUID CHANNEL_UID_ENERGY_POWER = createChannel(HS110, CHANNEL_ENERGY_POWER);
36     public static final ChannelUID CHANNEL_UID_ENERGY_TOTAL = createChannel(HS110, CHANNEL_ENERGY_TOTAL);
37     public static final ChannelUID CHANNEL_UID_ENERGY_VOLTAGE = createChannel(HS110, CHANNEL_ENERGY_VOLTAGE);
38     public static final ChannelUID CHANNEL_UID_LED = createChannel(HS100, CHANNEL_LED);
39     public static final ChannelUID CHANNEL_UID_OTHER = createChannel(HS100, "OTHER");
40     public static final ChannelUID CHANNEL_UID_RSSI = createChannel(HS100, CHANNEL_RSSI);
41     public static final ChannelUID CHANNEL_UID_SWITCH = createChannel(HS100, CHANNEL_SWITCH);
42
43     private static final String ID = "1234";
44
45     private ChannelUIDConstants() {
46         // Util class
47     }
48
49     private static ChannelUID createChannel(TPLinkSmartHomeThingType thingType, String channelId) {
50         return new ChannelUID(new ThingUID(thingType.thingTypeUID(), ID), channelId);
51     }
52
53     public static ChannelUID createChannel(TPLinkSmartHomeThingType thingType, String groupId, String channelId) {
54         return new ChannelUID(new ThingUID(thingType.thingTypeUID(), ID), groupId, channelId);
55     }
56 }