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.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 - 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
32 public class ICloudBindingConstants {
34 private static final String BINDING_ID = "icloud";
36 public static final String BRIDGE_ID = "account";
37 public static final String DEVICE_ID = "device";
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);
43 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(
44 Arrays.asList(THING_TYPE_ICLOUD, THING_TYPE_ICLOUDDEVICE));
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";
57 public static final String DEVICE_PROPERTY_IDHASH = "deviceIdHash";
58 public static final String DEVICE_PROPERTY_ID = "deviceId";
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";
65 public static final String FIND_MY_DEVICE_REQUEST_SUBJECT = "Find My Device alert";