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;
16 * Feedback that gives the state of all zones
28 * Zones 2 and 9 are ON, all others are OFF, and Zones 31 and 32 are unassigned.
31 * ZMP,010000001000000000000000000000XX
34 * @author Jeff Lauterbach - Initial Contribution
37 public class ZoneMapFeedback extends RadioRAFeedback {
39 private String zoneStates; // 32 bit String of (0,1,X)
41 public ZoneMapFeedback(String msg) {
42 String[] params = parse(msg, 1);
44 zoneStates = params[1];
47 public String getZoneStates() {
51 public char getZoneValue(int zone) {
52 if (zone < 1 || zone > zoneStates.length()) {
56 return zoneStates.charAt(zone - 1);