]> git.basschouten.com Git - openhab-addons.git/blob
6971de6aead60871efc3a3efa25c10f6dca91bb4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.melcloud.internal;
14
15 import java.util.Collections;
16 import java.util.Set;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
19
20 import org.openhab.core.thing.ThingTypeUID;
21
22 /**
23  * The {@link MelCloudBindingConstants} class defines common constants, which are
24  * used across the whole binding.
25  *
26  * @author Luca Calcaterra - Initial contribution
27  * @author Wietse van Buitenen - Added heatpump device
28  */
29 public class MelCloudBindingConstants {
30
31     private static final String BINDING_ID = "melcloud";
32
33     // List of Bridge Type UIDs
34     public static final ThingTypeUID THING_TYPE_MELCLOUD_ACCOUNT = new ThingTypeUID(BINDING_ID, "melcloudaccount");
35     public static final ThingTypeUID THING_TYPE_HEATPUMPDEVICE = new ThingTypeUID(BINDING_ID, "heatpumpdevice");
36
37     // List of all Thing Type UIDs
38     public static final ThingTypeUID THING_TYPE_ACDEVICE = new ThingTypeUID(BINDING_ID, "acdevice");
39
40     // List of all Channel ids
41     public static final String CHANNEL_POWER = "power";
42     public static final String CHANNEL_OPERATION_MODE = "operationMode";
43     public static final String CHANNEL_SET_TEMPERATURE = "setTemperature";
44     public static final String CHANNEL_FAN_SPEED = "fanSpeed";
45     public static final String CHANNEL_VANE_HORIZONTAL = "vaneHorizontal";
46     public static final String CHANNEL_VANE_VERTICAL = "vaneVertical";
47     public static final String CHANNEL_SET_TEMPERATURE_ZONE1 = "setTemperatureZone1";
48     public static final String CHANNEL_ROOM_TEMPERATURE_ZONE1 = "roomTemperatureZone1";
49     public static final String CHANNEL_FORCED_HOTWATERMODE = "forcedHotWaterMode";
50     public static final String CHANNEL_TANKWATERTEMPERATURE = "tankWaterTemperature";
51
52     // Read Only Channels
53     public static final String CHANNEL_ROOM_TEMPERATURE = "roomTemperature";
54     public static final String CHANNEL_LAST_COMMUNICATION = "lastCommunication";
55     public static final String CHANNEL_NEXT_COMMUNICATION = "nextCommunication";
56     public static final String CHANNEL_HAS_PENDING_COMMAND = "hasPendingCommand";
57     public static final String CHANNEL_OFFLINE = "offline";
58
59     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPE_UIDS = Collections
60             .unmodifiableSet(Stream.of(THING_TYPE_MELCLOUD_ACCOUNT, THING_TYPE_ACDEVICE, THING_TYPE_HEATPUMPDEVICE)
61                     .collect(Collectors.toSet()));
62
63     public static final Set<ThingTypeUID> DISCOVERABLE_THING_TYPE_UIDS = Collections
64             .unmodifiableSet(Stream.of(THING_TYPE_ACDEVICE, THING_TYPE_HEATPUMPDEVICE).collect(Collectors.toSet()));
65 }