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.lgwebos.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler;
17 import org.openhab.binding.lgwebos.internal.handler.core.CommandConfirmation;
18 import org.openhab.core.types.Command;
19 import org.openhab.core.types.RefreshType;
22 * Handles rcButton Control Command. This allows to send IR Remote Control button presses to the TV.
24 * @author Robert Brodt - Initial contribution
27 public class RCButtonControl extends BaseChannelHandler<CommandConfirmation> {
30 public void onReceiveCommand(String channelId, LGWebOSHandler handler, Command command) {
31 if (RefreshType.REFRESH == command) {
34 handler.getSocket().sendRCButton(command.toString(), getDefaultResponseListener());