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.KeypadConfigPalladiom;
19 import org.openhab.core.thing.Thing;
20 import org.slf4j.Logger;
21 import org.slf4j.LoggerFactory;
24 * Handler responsible for communicating with Lutron Palladiom keypads used in
25 * Homeworks QS systems
27 * @author Bob Adair - Initial contribution
30 public class PalladiomKeypadHandler extends BaseKeypadHandler {
32 private final Logger logger = LoggerFactory.getLogger(PalladiomKeypadHandler.class);
35 protected void configureComponents(@Nullable String model) {
36 String mod = model == null ? "Generic" : model;
37 logger.debug("Configuring components for keypad model {}", model);
51 buttonList = kp.getComponents(mod, ComponentType.BUTTON);
52 ledList = kp.getComponents(mod, ComponentType.LED);
53 cciList = kp.getComponents(mod, ComponentType.CCI);
56 logger.warn("No valid keypad model defined ({}). Assuming Generic setting.", mod);
59 buttonList = kp.getComponents("Generic", ComponentType.BUTTON);
60 ledList = kp.getComponents("Generic", ComponentType.LED);
61 cciList = kp.getComponents("Generic", ComponentType.CCI);
66 public PalladiomKeypadHandler(Thing thing) {
68 kp = new KeypadConfigPalladiom();