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.km200.internal;
15 import java.util.ArrayList;
16 import java.util.Collections;
17 import java.util.List;
19 import org.openhab.core.thing.ThingTypeUID;
22 * The KM200ThingType enum is representing the things
24 * @author Markus Eckhardt - Initial contribution
27 public enum KM200ThingType {
28 GATEWAY("/gateway", KM200BindingConstants.THING_TYPE_GATEWAY) {
30 public List<String> asBridgeProperties() {
31 List<String> asProperties = new ArrayList<>();
32 asProperties.add("versionFirmware");
33 asProperties.add("instAccess");
34 asProperties.add("versionHardware");
35 asProperties.add("uuid");
36 asProperties.add("instWriteAccess");
37 asProperties.add("openIPAccess");
42 DHWCIRCUIT("/dhwCircuits", KM200BindingConstants.THING_TYPE_DHW_CIRCUIT) {
44 public List<String> ignoreSubService() {
45 List<String> subServices = new ArrayList<>();
46 subServices.add("switchPrograms");
51 public String getActiveCheckSubPath() {
56 HEATINGCIRCUIT("/heatingCircuits", KM200BindingConstants.THING_TYPE_HEATING_CIRCUIT) {
58 public List<String> ignoreSubService() {
59 List<String> subServices = new ArrayList<>();
60 subServices.add("switchPrograms");
65 public String getActiveCheckSubPath() {
70 HEATSOURCE("/heatSources", KM200BindingConstants.THING_TYPE_HEAT_SOURCE),
72 SOLARCIRCUIT("/solarCircuits", KM200BindingConstants.THING_TYPE_SOLAR_CIRCUIT) {
74 public String getActiveCheckSubPath() {
79 APPLIANCE("/system/appliance", KM200BindingConstants.THING_TYPE_SYSTEM_APPLIANCE),
81 HOLIDAYMODES("/system/holidayModes", KM200BindingConstants.THING_TYPE_SYSTEM_HOLIDAYMODES),
83 NOTIFICATIONS("/notifications", KM200BindingConstants.THING_TYPE_NOTIFICATION),
85 SENSOR("/system/sensors", KM200BindingConstants.THING_TYPE_SYSTEM_SENSOR),
87 SYSTEM("/system", KM200BindingConstants.THING_TYPE_SYSTEM) {
89 public List<String> ignoreSubService() {
90 List<String> subServices = new ArrayList<>();
91 subServices.add("sensors");
92 subServices.add("appliance");
93 subServices.add("holidayModes");
98 public List<String> asBridgeProperties() {
99 List<String> asProperties = new ArrayList<>();
100 asProperties.add("bus");
101 asProperties.add("systemType");
102 asProperties.add("brand");
103 asProperties.add("info");
108 SWITCHPROGRAM("", KM200BindingConstants.THING_TYPE_SWITCH_PROGRAM),
110 SYSTEMSTATES("/systemStates", KM200BindingConstants.THING_TYPE_SYSTEMSTATES);
112 public final String rootPath;
114 public final ThingTypeUID thingTypeUID;
116 KM200ThingType(String rootPath, ThingTypeUID thingTypeUID) {
117 this.rootPath = rootPath;
118 this.thingTypeUID = thingTypeUID;
121 public String getRootPath() {
125 public ThingTypeUID getThingTypeUID() {
129 public List<String> ignoreSubService() {
130 return Collections.emptyList();
133 public String getActiveCheckSubPath() {
137 public List<String> asBridgeProperties() {
138 return Collections.emptyList();