2 * Copyright (c) 2010-2020 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;
19 * Set Dimmer Level (SDL)
20 * Set an individual Dimmer’s light level.
22 * @author Jeff Lauterbach - Initial Contribution
25 public class SetDimmerLevelCommand extends RadioRACommand {
27 private int zoneNumber; // 1 to 32
28 private int dimmerLevel; // 0 to 100
29 private Integer fadeSec; // 0 to 240 (optional)
31 public SetDimmerLevelCommand(int zoneNumber, int dimmerLevel) {
32 this.zoneNumber = zoneNumber;
33 this.dimmerLevel = dimmerLevel;
36 public void setFadeSeconds(int seconds) {
41 public String getCommand() {
46 public List<String> getArgs() {
47 List<String> args = new ArrayList<>();
48 args.add(String.valueOf(zoneNumber));
49 args.add(String.valueOf(dimmerLevel));
51 if (fadeSec != null) {
52 args.add(String.valueOf(fadeSec));