]> git.basschouten.com Git - openhab-addons.git/blob
cbf415328fbeac784dd103b9f4fccecb03f9eb4a
[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.knx.internal.channel;
14
15 import static org.openhab.binding.knx.internal.KNXBindingConstants.*;
16
17 import java.util.Collections;
18 import java.util.Set;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21
22 import tuwien.auto.calimero.dptxlator.DPTXlatorBoolean;
23
24 /**
25  * switch channel type description
26  *
27  * @author Simon Kaufmann - initial contribution and API.
28  *
29  */
30 @NonNullByDefault
31 class TypeSwitch extends KNXChannelType {
32
33     TypeSwitch() {
34         super(CHANNEL_SWITCH, CHANNEL_SWITCH_CONTROL);
35     }
36
37     @Override
38     protected Set<String> getAllGAKeys() {
39         return Collections.singleton(GA);
40     }
41
42     @Override
43     protected String getDefaultDPT(String gaConfigKey) {
44         return DPTXlatorBoolean.DPT_SWITCH.getID();
45     }
46 }