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.ecobee.internal.enums;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
18 import com.google.gson.annotations.SerializedName;
21 * The {@link VentilatorMode} defines the possible ventilator modes.
23 * @author Mark Hilbush - Initial contribution
26 public enum VentilatorMode {
28 @SerializedName("auto")
31 @SerializedName("minontime")
32 MIN_ON_TIME("minontime"),
37 @SerializedName("off")
40 private final String mode;
42 private VentilatorMode(String mode) {
46 public String value() {
50 public static VentilatorMode forValue(@Nullable String v) {
52 for (VentilatorMode vm : VentilatorMode.values()) {
53 if (vm.mode.equals(v)) {
58 throw new IllegalArgumentException("Invalid vent: " + v);
62 public String toString() {