]> git.basschouten.com Git - openhab-addons.git/blob
ee482f5e203f10eae0cb5f3245f7bdb4271a3692
[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.yeelight.internal.lib.enums;
14
15 /**
16  * @author Coaster Li - Initial contribution
17  * @author Joe Ho - Added duration
18  */
19 public enum DeviceAction {
20     open,
21     close,
22     brightness,
23     color,
24     colortemperature,
25     increase_bright,
26     decrease_bright,
27     increase_ct,
28     decrease_ct,
29     background_color,
30     background_brightness,
31     background_on,
32     background_off,
33     nightlight_off,
34     nightlight_on;
35
36     private String mStrValue;
37     private int mIntValue;
38     private int mIntDuration;
39
40     public void putValue(String value) {
41         this.mStrValue = value;
42     }
43
44     public void putValue(int value) {
45         this.mIntValue = value;
46     }
47
48     public void putDuration(int duration) {
49         this.mIntDuration = duration;
50     }
51
52     public String strValue() {
53         return mStrValue;
54     }
55
56     public int intValue() {
57         return mIntValue;
58     }
59
60     public int intDuration() {
61         return mIntDuration;
62     }
63 }