]> git.basschouten.com Git - openhab-addons.git/blob
a8cb73469349bdb9490b873ac8f47ecb9e77b2cf
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.amazonechocontrol.internal.smarthome;
14
15 import java.util.Map;
16 import java.util.Set;
17 import java.util.function.Function;
18
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.binding.amazonechocontrol.internal.AmazonEchoControlBindingConstants;
21 import org.openhab.binding.amazonechocontrol.internal.handler.SmartHomeDeviceHandler;
22 import org.openhab.core.thing.type.ChannelTypeUID;
23
24 /**
25  * @author Michael Geramb - Initial contribution
26  */
27 @NonNullByDefault
28 public class Constants {
29     public static final Map<String, Function<SmartHomeDeviceHandler, HandlerBase>> HANDLER_FACTORY = Map.of(
30             HandlerPowerController.INTERFACE, HandlerPowerController::new, HandlerBrightnessController.INTERFACE,
31             HandlerBrightnessController::new, HandlerColorController.INTERFACE, HandlerColorController::new,
32             HandlerColorTemperatureController.INTERFACE, HandlerColorTemperatureController::new,
33             HandlerSecurityPanelController.INTERFACE, HandlerSecurityPanelController::new,
34             HandlerAcousticEventSensor.INTERFACE, HandlerAcousticEventSensor::new, HandlerTemperatureSensor.INTERFACE,
35             HandlerTemperatureSensor::new, HandlerThermostatController.INTERFACE, HandlerThermostatController::new,
36             HandlerPercentageController.INTERFACE, HandlerPercentageController::new,
37             HandlerPowerLevelController.INTERFACE, HandlerPowerLevelController::new);
38
39     public static final Set<String> SUPPORTED_INTERFACES = HANDLER_FACTORY.keySet();
40
41     // channel types
42     public static final ChannelTypeUID CHANNEL_TYPE_TEMPERATURE = new ChannelTypeUID(
43             AmazonEchoControlBindingConstants.BINDING_ID, "temperature");
44     public static final ChannelTypeUID CHANNEL_TYPE_TARGETSETPOINT = new ChannelTypeUID(
45             AmazonEchoControlBindingConstants.BINDING_ID, "targetSetpoint");
46
47     // List of Item types
48     public static final String ITEM_TYPE_SWITCH = "Switch";
49     public static final String ITEM_TYPE_DIMMER = "Dimmer";
50     public static final String ITEM_TYPE_STRING = "String";
51     public static final String ITEM_TYPE_NUMBER = "Number";
52     public static final String ITEM_TYPE_NUMBER_TEMPERATURE = "Number:Temperature";
53     public static final String ITEM_TYPE_CONTACT = "Contact";
54     public static final String ITEM_TYPE_COLOR = "Color";
55 }