2 * Copyright (c) 2010-2022 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.lgtvserial.internal.protocol.serial.commands;
15 import java.io.IOException;
17 import org.openhab.binding.lgtvserial.internal.protocol.serial.LGSerialCommand;
18 import org.openhab.binding.lgtvserial.internal.protocol.serial.LGSerialCommunicator;
19 import org.openhab.binding.lgtvserial.internal.protocol.serial.LGSerialResponse;
20 import org.openhab.core.thing.ChannelUID;
23 * This command handles a raw command to be sent to the device.
25 * This proves useful when a command is not implemented yet to be able to send commands yourselves with the proper
28 * @author Richard Lavoie - Initial contribution
31 public class RawCommand implements LGSerialCommand {
34 public LGSerialResponse parseResponse(String response) {
39 public void execute(ChannelUID channel, LGSerialCommunicator comm, Object data) throws IOException {
40 // No read request possible
42 comm.write(this, data.toString(), channel);