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.io.imperihome.internal.model.device;
16 * Device type enumeration. Contains ImperiHome API type strings.
18 * @author Pepijn de Geus - Initial contribution
20 public enum DeviceType {
26 CO2_ALERT("DevCO2Alert"),
28 ELECTRICITY("DevElectricity"),
30 GENERIC_SENSOR("DevGenericSensor"),
31 HYGROMETRY("DevHygrometry"),
33 LUMINOSITY("DevLuminosity"),
35 MULTI_SWITCH("DevMultiSwitch"),
38 PLAYLIST("DevPlaylist"),
39 PRESSURE("DevPressure"),
41 RGB_LIGHT("DevRGBLight"),
43 SHUTTER("DevShutter"),
45 TEMPERATURE("DevTemperature"),
46 TEMP_HYGRO("DevTempHygro"),
47 THERMOSTAT("DevThermostat", "curmode", "curtemp"),
51 private final String apiString;
52 private final String[] requiredLinks;
54 DeviceType(String apiString, String... requiredLinks) {
55 this.apiString = apiString;
56 this.requiredLinks = requiredLinks;
59 public String getApiString() {
63 public String[] getRequiredLinks() {
67 public static DeviceType forApiString(String apiString) {
68 for (DeviceType deviceType : values()) {
69 if (deviceType.getApiString().equalsIgnoreCase(apiString.trim())) {