2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.lutron.internal.handler;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.lutron.internal.discovery.project.ComponentType;
18 import org.openhab.binding.lutron.internal.keypadconfig.KeypadConfigTabletopSeetouch;
19 import org.openhab.core.thing.Thing;
20 import org.slf4j.Logger;
21 import org.slf4j.LoggerFactory;
24 * Handler responsible for communicating with Lutron Tabletop seeTouch keypads used in RadioRA2 and Homeworks QS systems
25 * (e.g. RR-T5RL, RR-T10RL, RR-T15RL, etc.)
27 * @author Bob Adair - Initial contribution
30 public class TabletopKeypadHandler extends BaseKeypadHandler {
32 private final Logger logger = LoggerFactory.getLogger(TabletopKeypadHandler.class);
35 protected void configureComponents(@Nullable String model) {
36 String mod = model == null ? "Generic" : model;
37 logger.debug("Configuring components for keypad model {}", model);
46 buttonList = kp.getComponents(mod, ComponentType.BUTTON);
47 ledList = kp.getComponents(mod, ComponentType.LED);
51 logger.warn("No valid keypad model defined ({}). Assuming model T15RL.", mod);
54 buttonList = kp.getComponents("Generic", ComponentType.BUTTON);
55 ledList = kp.getComponents("Generic", ComponentType.LED);
60 public TabletopKeypadHandler(Thing thing) {
62 kp = new KeypadConfigTabletopSeetouch();