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.hyperion.internal.protocol;
15 import com.google.gson.annotations.SerializedName;
18 * The {@link ColorCommand} is a POJO for sending a color command
19 * to the Hyperion server.
21 * @author Daniel Walters - Initial contribution
23 public class ColorCommand extends HyperionCommand {
25 @SerializedName("origin")
26 private String origin;
27 private static final String NAME = "color";
29 @SerializedName("priority")
32 @SerializedName("color")
33 private int[] color = new int[3];
35 public ColorCommand(int red, int green, int blue, int priority) {
37 setPriority(priority);
38 setColor(red, green, blue);
41 public void setColor(int red, int green, int blue) {
47 public int getPriority() {
51 public void setPriority(int priority) {
52 this.priority = priority;
55 public int[] getColor() {
59 public void setOrigin(String origin) {
63 public String getOrigin() {