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.homematic.internal.model;
16 * Definition of the Homematic paramset types.
18 * @author Gerhard Riegler - Initial contribution
20 public enum HmParamsetType {
25 * Parses the string and returns the HmParamsetType object.
27 public static HmParamsetType parse(String type) {
29 if (type.equals(VALUES.toString()) || type.equals(VALUES.getId())) {
31 } else if (type.equals(MASTER.toString()) || type.equals(MASTER.getId())) {
35 throw new RuntimeException("Unknown HmParamsetType " + type);
39 * Returns the first letter as id of the paramset type.
41 public String getId() {
42 return name().substring(0, 1);