2 * Copyright (c) 2010-2022 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;
17 import java.util.stream.Collectors;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
22 * Represents the different internal zone and source IDs of the Nuvo Whole House Amplifier
24 * @author Michael Lobstein - Initial contribution
27 public enum NuvoEnum {
28 SYSTEM("SYSTEM", "SYSTEM"),
38 ZONE10("Z10", "ZCFG10"),
39 ZONE11("Z11", "ZCFG11"),
40 ZONE12("Z12", "ZCFG12"),
41 ZONE13("Z13", "ZCFG13"),
42 ZONE14("Z14", "ZCFG14"),
43 ZONE15("Z15", "ZCFG15"),
44 ZONE16("Z16", "ZCFG16"),
45 ZONE17("Z17", "ZCFG17"),
46 ZONE18("Z18", "ZCFG18"),
47 ZONE19("Z19", "ZCFG19"),
48 ZONE20("Z20", "ZCFG20"),
49 SOURCE1("S1", "SCFG1"),
50 SOURCE2("S2", "SCFG2"),
51 SOURCE3("S3", "SCFG3"),
52 SOURCE4("S4", "SCFG4"),
53 SOURCE5("S5", "SCFG5"),
54 SOURCE6("S6", "SCFG6");
56 private final String id;
57 private final String cfgId;
59 // make a list of all valid source ids
60 public static final List<String> VALID_SOURCES = Arrays.stream(values()).map(NuvoEnum::name)
61 .filter(s -> s.contains("SOURCE")).collect(Collectors.toList());
63 NuvoEnum(String id, String cfgId) {
73 public String getId() {
80 * @return the config id
82 public String getConfigId() {