2 * Copyright (c) 2010-2021 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.radiora.protocol;
15 import java.util.ArrayList;
16 import java.util.List;
18 import org.openhab.core.library.types.OnOffType;
21 * Set Switch Level (SSL)
22 * Turn an individual Switch ON or OFF.
24 * @author Jeff Lauterbach - Initial Contribution
27 public class SetSwitchLevelCommand extends RadioRACommand {
29 private int zoneNumber; // 1 to 32
30 private OnOffType state; // ON/OFF
31 private Integer delaySec; // 0 to 240 (optional)
33 public SetSwitchLevelCommand(int zoneNumber, OnOffType state) {
34 this.zoneNumber = zoneNumber;
38 public void setDelaySeconds(int seconds) {
39 this.delaySec = seconds;
43 public String getCommand() {
48 public List<String> getArgs() {
49 List<String> args = new ArrayList<>();
50 args.add(String.valueOf(zoneNumber));
51 args.add(String.valueOf(state));
53 if (delaySec != null) {
54 args.add(String.valueOf(delaySec));