2 * Copyright (c) 2010-2022 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.icloud.internal;
15 import java.util.Arrays;
16 import java.util.HashSet;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.core.thing.ThingTypeUID;
23 * The {@link ICloudBindingConstants} class defines common constants, which are
24 * used across the whole binding.
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
33 public class ICloudBindingConstants {
35 private static final String BINDING_ID = "icloud";
37 public static final String BRIDGE_ID = "account";
38 public static final String DEVICE_ID = "device";
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);
44 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(
45 Arrays.asList(THING_TYPE_ICLOUD, THING_TYPE_ICLOUDDEVICE));
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";
58 public static final String DEVICE_PROPERTY_IDHASH = "deviceIdHash";
59 public static final String DEVICE_PROPERTY_ID = "deviceId";
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";
66 public static final String FIND_MY_DEVICE_REQUEST_SUBJECT = "Find My Device alert";