]> git.basschouten.com Git - openhab-addons.git/blob
0e22b80501c9d31090739be5265576361935bc5b
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.lgwebos.internal;
14
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;
20
21 /**
22  * Handles Toast Control Command. This allows to send messages to the TV screen.
23  *
24  * @author Sebastian Prehn - Initial contribution
25  */
26 @NonNullByDefault
27 public class ToastControlToast extends BaseChannelHandler<CommandConfirmation> {
28
29     @Override
30     public void onReceiveCommand(String channelId, LGWebOSHandler handler, Command command) {
31         if (RefreshType.REFRESH == command) {
32             return;
33         }
34         handler.getSocket().showToast(command.toString(), getDefaultResponseListener());
35     }
36 }