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.dwdpollenflug.internal;
15 import java.util.Collections;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
24 * The {@link DWDPollenflugBindingConstants} class defines common constants, which are
25 * used across the whole binding.
27 * @author Johannes Ott - Initial contribution
30 public class DWDPollenflugBindingConstants {
32 private static final String BINDING_ID = "dwdpollenflug";
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)";
39 // List of all Thing Type UIDs
40 public static final ThingTypeUID THING_TYPE_REGION = new ThingTypeUID(BINDING_ID, "region");
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())
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";
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";
62 public static final String TRIGGER_REFRESHED = "REFRESHED";
64 // Bridge config properties
65 public static final String REFRESH = "refresh";
68 public static final String PROPERTY_SENDER = "sender";
69 public static final String PROPERTY_NAME = "name";
71 // Region config properties
72 public static final String REGION_ID = "regionID";
75 public static final String PROPERTY_REGION_NAME = "region_name";
76 public static final String PROPERTY_PARTREGION_NAME = "partregion_name";