]> git.basschouten.com Git - openhab-addons.git/blob
e5078c237259e6ae4206e5fc87375246c3579449
[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.dwdpollenflug.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.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
22
23 /**
24  * The {@link DWDPollenflugBindingConstants} class defines common constants, which are
25  * used across the whole binding.
26  *
27  * @author Johannes Ott - Initial contribution
28  */
29 @NonNullByDefault
30 public class DWDPollenflugBindingConstants {
31
32     private static final String BINDING_ID = "dwdpollenflug";
33
34     // bridge
35     public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
36     public static final String DWD = "dwd";
37     public static final String BRIDGE_LABEL = "DWD Pollen Count Index (Bridge)";
38
39     // List of all Thing Type UIDs
40     public static final ThingTypeUID THING_TYPE_REGION = new ThingTypeUID(BINDING_ID, "region");
41
42     // @formatter:off
43     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = 
44         Collections.unmodifiableSet(Stream
45             .of(THING_TYPE_BRIDGE, THING_TYPE_REGION)
46             .collect(Collectors.toSet())
47         );
48     // @formatter:on
49
50     // Channels of pollen groups
51     public static final String CHANNEL_TODAY = "today";
52     public static final String CHANNEL_TOMORROW = "tomorrow";
53     public static final String CHANNEL_DAYAFTER_TO = "dayafter_to";
54
55     // Channels of region update
56     public static final String CHANNEL_UPDATES = "updates";
57     public static final String CHANNEL_REFRESHED = "refreshed";
58     public static final String CHANNEL_NEXT_UPDATE = "next_update";
59     public static final String CHANNEL_LAST_UPDATE = "last_update";
60     public static final String CHANNEL_UPDATED = "updated";
61
62     public static final String TRIGGER_REFRESHED = "REFRESHED";
63
64     // Bridge config properties
65     public static final String REFRESH = "refresh";
66
67     // Bridge properties
68     public static final String PROPERTY_SENDER = "sender";
69     public static final String PROPERTY_NAME = "name";
70
71     // Region config properties
72     public static final String REGION_ID = "regionID";
73
74     // Region properties
75     public static final String PROPERTY_REGION_NAME = "region_name";
76     public static final String PROPERTY_PARTREGION_NAME = "partregion_name";
77 }