]> git.basschouten.com Git - openhab-addons.git/blob
f8080956ee1b6ff22f77fd9d113ceb600cfa309b
[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.loxone.internal.controls;
14
15 import org.openhab.binding.loxone.internal.types.LxUuid;
16
17 /**
18  * A LeftRightDigital type of control on Loxone Miniserver.
19  * <p>
20  * According to Loxone API documentation, LeftRightDigital control is a virtual input that is digital and has an input
21  * type left-right buttons. It has no states and can only accept commands. Only left/right (which are actually equal to
22  * up/down commands of {@link LxControlUpDownDigital}) on/off commands are generated. Pulse commands are not supported,
23  * because of lack of corresponding feature in openHAB. Pulse can be emulated by quickly alternating between ON and OFF
24  * commands.
25  *
26  * @author Pawel Pieczul - initial contribution
27  *
28  */
29 class LxControlLeftRightDigital extends LxControlUpDownDigital {
30
31     static class Factory extends LxControlInstance {
32         @Override
33         LxControl create(LxUuid uuid) {
34             return new LxControlLeftRightDigital(uuid);
35         }
36
37         @Override
38         String getType() {
39             return "leftrightdigital";
40         }
41     }
42
43     private LxControlLeftRightDigital(LxUuid uuid) {
44         super(uuid);
45     }
46
47     @Override
48     public void initialize(LxControlConfig config) {
49         super.initialize(config, " / Left", "Left/Right Digital: Left", " / Right", "Left/Right Digital: Right");
50     }
51 }