2 * Copyright (c) 2010-2024 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.pentair.internal.handler.helpers;
15 import java.util.Arrays;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
20 * The {@link PentairControllerLightMode } enum constants used to define the different light modes of the controller.
22 * @author Jeff James - Initial contribution
25 public enum PentairControllerLightMode {
29 COLORSYNC(128, "Color Sync"),
30 COLORSWIM(144, "Color Swim"),
31 COLORSET(160, "COLORSET"),
33 ROMANCE(178, "ROMANCE"),
34 CARIBBENA(179, "CARIBBEAN"),
35 AMERICAN(180, "AMERICAN"),
36 SUNSET(181, "SUNSET"),
42 MAGENTA(197, "MAGENTA");
44 private final int number;
45 private final String name;
47 private PentairControllerLightMode(int n, String name) {
52 public int getModeNumber() {
56 public String getName() {
60 public static PentairControllerLightMode valueOfModeNumber(int modeNumber) {
61 return Arrays.stream(values()).filter(value -> (value.getModeNumber() == modeNumber)).findFirst().orElse(EMPTY);