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.lutron.internal.radiora.protocol;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory;
20 * Feedback for when a device was changed locally (not through Master Control)
26 * LZC,<Zone Number>,<State>
32 * Dimmer 1 changed from 100% to 50%
38 * Dimmer 4 changed from OFF to 25%
44 * In a bridged system, a system parameter S1 or S2 will be appended.
50 * @author Jeff Lauterbach - Initial Contribution
54 public class LocalZoneChangeFeedback extends RadioRAFeedback {
55 private final Logger logger = LoggerFactory.getLogger(LocalZoneChangeFeedback.class);
57 private int zoneNumber; // 1 to 32
58 private State state; // ON, OFF, CHG
59 private int system; // 1 or 2, or 0 for none
67 public LocalZoneChangeFeedback(String msg) {
68 String[] params = parse(msg, 2);
70 zoneNumber = Integer.parseInt(params[1].trim());
71 state = State.valueOf(params[2].trim().toUpperCase());
74 if (params.length > 3) {
75 String sysParam = params[3].trim().toUpperCase();
76 if ("S1".equals(sysParam)) {
78 } else if ("S2".equals(sysParam)) {
81 logger.debug("Invalid 3rd parameter {} in LZC message. Should be S1 or S2.", sysParam);
86 public State getState() {
90 public int getZoneNumber() {
94 public int getSystem() {