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.venstarthermostat.internal.dto;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link VenstarFanMode} represents the value of the fan mode returned
21 * @author Matthew Davies - Initial contribution
24 public enum VenstarFanMode {
25 AUTO(0, "auto", "Auto"),
30 private String friendlyName;
32 VenstarFanMode(int mode, String name, String friendlyName) {
35 this.friendlyName = friendlyName;
42 public String modeName() {
46 public String friendlyName() {
50 public static VenstarFanMode fromInt(int mode) throws IllegalArgumentException {
51 for (VenstarFanMode fm : values()) {
52 if (fm.mode == mode) {
57 throw (new IllegalArgumentException("Invalid fan mode " + mode));