]> git.basschouten.com Git - openhab-addons.git/blob
5a94cc9aeda49f9db7648e8febad7fc5c7eaef80
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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
28  *         - Class renamed to be more consistent
29  *         - Constant FIND_MY_DEVICE_REQUEST_SUBJECT introduced
30  * @author GaĆ«l L'hopital - Added low battery
31  */
32 @NonNullByDefault
33 public class ICloudBindingConstants {
34
35     private static final String BINDING_ID = "icloud";
36
37     public static final String BRIDGE_ID = "account";
38     public static final String DEVICE_ID = "device";
39
40     // List of all Thing Type UIDs
41     public static final ThingTypeUID THING_TYPE_ICLOUD = new ThingTypeUID(BINDING_ID, BRIDGE_ID);
42     public static final ThingTypeUID THING_TYPE_ICLOUDDEVICE = new ThingTypeUID(BINDING_ID, DEVICE_ID);
43
44     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(
45             Arrays.asList(THING_TYPE_ICLOUD, THING_TYPE_ICLOUDDEVICE));
46
47     // List of all Channel IDs
48     public static final String BATTERY_STATUS = "batteryStatus";
49     public static final String BATTERY_LEVEL = "batteryLevel";
50     public static final String LOW_BATTERY = "lowBattery";
51     public static final String FIND_MY_PHONE = "findMyPhone";
52     public static final String LOCATION = "location";
53     public static final String LOCATION_ACCURACY = "locationAccuracy";
54     public static final String LOCATION_LASTUPDATE = "locationLastUpdate";
55     public static final String DEVICE_NAME = "deviceName";
56
57     // Device properties
58     public static final String DEVICE_PROPERTY_IDHASH = "deviceIdHash";
59     public static final String DEVICE_PROPERTY_ID = "deviceId";
60
61     // i18n
62     public static final String DEVICE_PROPERTY_ID_LABEL = "icloud.device-thing.parameter.id.label";
63     public static final String DEVICE_PROPERTY_OWNER_LABEL = "icloud.account-thing.property.owner";
64
65     // Miscellaneous
66     public static final String FIND_MY_DEVICE_REQUEST_SUBJECT = "Find My Device alert";
67 }