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.nuvo.internal.communication;
15 import java.util.Arrays;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
21 * Represents the different internal zone and source IDs of the Nuvo Whole House Amplifier
23 * @author Michael Lobstein - Initial contribution
26 public enum NuvoEnum {
27 SYSTEM("SYSTEM", "SYSTEM", 0),
28 ZONE1("Z1", "ZCFG1", 1),
29 ZONE2("Z2", "ZCFG2", 2),
30 ZONE3("Z3", "ZCFG3", 3),
31 ZONE4("Z4", "ZCFG4", 4),
32 ZONE5("Z5", "ZCFG5", 5),
33 ZONE6("Z6", "ZCFG6", 6),
34 ZONE7("Z7", "ZCFG7", 7),
35 ZONE8("Z8", "ZCFG8", 8),
36 ZONE9("Z9", "ZCFG9", 9),
37 ZONE10("Z10", "ZCFG10", 10),
38 ZONE11("Z11", "ZCFG11", 11),
39 ZONE12("Z12", "ZCFG12", 12),
40 ZONE13("Z13", "ZCFG13", 13),
41 ZONE14("Z14", "ZCFG14", 14),
42 ZONE15("Z15", "ZCFG15", 15),
43 ZONE16("Z16", "ZCFG16", 16),
44 ZONE17("Z17", "ZCFG17", 17),
45 ZONE18("Z18", "ZCFG18", 18),
46 ZONE19("Z19", "ZCFG19", 19),
47 ZONE20("Z20", "ZCFG20", 20),
48 SOURCE1("S1", "SCFG1", 1),
49 SOURCE2("S2", "SCFG2", 2),
50 SOURCE3("S3", "SCFG3", 3),
51 SOURCE4("S4", "SCFG4", 4),
52 SOURCE5("S5", "SCFG5", 5),
53 SOURCE6("S6", "SCFG6", 6);
55 private final String id;
56 private final String cfgId;
57 private final int num;
59 // make a list of all valid source enums
60 public static final List<NuvoEnum> VALID_SOURCES = Arrays.stream(values()).filter(s -> s.name().contains("SOURCE"))
63 NuvoEnum(String id, String cfgId, int num) {
74 public String getId() {
81 * @return the config id
83 public String getConfigId() {