]> git.basschouten.com Git - openhab-addons.git/blob
0cdee8173a1437ccf22cbe7dc31864f5e3c0cceb
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.icloud.internal;
14
15 import java.util.Arrays;
16 import java.util.HashSet;
17 import java.util.Set;
18
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.core.thing.ThingTypeUID;
21
22 /**
23  * The {@link ICloudBindingConstants} class defines common constants, which are
24  * used across the whole binding.
25  *
26  * @author Patrik Gfeller - Initial contribution
27  * @author Patrik Gfeller - Class renamed to be more consistent
28  * @author Patrik Gfeller - Constant FIND_MY_DEVICE_REQUEST_SUBJECT introduced
29  * @author GaĆ«l L'hopital - Added low battery
30  */
31 @NonNullByDefault
32 public class ICloudBindingConstants {
33
34     private static final String BINDING_ID = "icloud";
35
36     public static final String BRIDGE_ID = "account";
37     public static final String DEVICE_ID = "device";
38
39     // List of all Thing Type UIDs
40     public static final ThingTypeUID THING_TYPE_ICLOUD = new ThingTypeUID(BINDING_ID, BRIDGE_ID);
41     public static final ThingTypeUID THING_TYPE_ICLOUDDEVICE = new ThingTypeUID(BINDING_ID, DEVICE_ID);
42
43     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(
44             Arrays.asList(THING_TYPE_ICLOUD, THING_TYPE_ICLOUDDEVICE));
45
46     // List of all Channel IDs
47     public static final String BATTERY_STATUS = "batteryStatus";
48     public static final String BATTERY_LEVEL = "batteryLevel";
49     public static final String LOW_BATTERY = "lowBattery";
50     public static final String FIND_MY_PHONE = "findMyPhone";
51     public static final String LOCATION = "location";
52     public static final String LOCATION_ACCURACY = "locationAccuracy";
53     public static final String LOCATION_LASTUPDATE = "locationLastUpdate";
54     public static final String DEVICE_NAME = "deviceName";
55
56     // Device properties
57     public static final String DEVICE_PROPERTY_IDHASH = "deviceIdHash";
58     public static final String DEVICE_PROPERTY_ID = "deviceId";
59
60     // i18n
61     public static final String DEVICE_PROPERTY_ID_LABEL = "icloud.device-thing.parameter.id.label";
62     public static final String DEVICE_PROPERTY_OWNER_LABEL = "icloud.account-thing.property.owner";
63
64     // Miscellaneous
65     public static final String FIND_MY_DEVICE_REQUEST_SUBJECT = "Find My Device alert";
66 }