2 * Copyright (c) 2010-2020 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.openweathermap.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17 import org.openhab.core.thing.type.ChannelGroupTypeUID;
20 * The {@link OpenWeatherMapBindingConstants} class defines common constants, which are used across the whole binding.
22 * @author Christoph Weitkamp - Initial contribution
25 public class OpenWeatherMapBindingConstants {
27 public static final String BINDING_ID = "openweathermap";
29 public static final String API = "api";
30 public static final String LOCAL = "local";
33 public static final ThingTypeUID THING_TYPE_WEATHER_API = new ThingTypeUID(BINDING_ID, "weather-api");
36 public static final ThingTypeUID THING_TYPE_WEATHER_AND_FORECAST = new ThingTypeUID(BINDING_ID,
37 "weather-and-forecast");
38 public static final ThingTypeUID THING_TYPE_UVINDEX = new ThingTypeUID(BINDING_ID, "uvindex");
40 // List of all properties
41 public static final String CONFIG_API_KEY = "apikey";
42 public static final String CONFIG_LANGUAGE = "language";
43 public static final String CONFIG_LOCATION = "location";
45 // Channel group types
46 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_STATION = new ChannelGroupTypeUID(BINDING_ID, "station");
47 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_HOURLY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
49 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_DAILY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
51 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_UVINDEX = new ChannelGroupTypeUID(BINDING_ID, "uvindex");
53 // List of all channel groups
54 public static final String CHANNEL_GROUP_STATION = "station";
55 public static final String CHANNEL_GROUP_CURRENT_WEATHER = "current";
56 public static final String CHANNEL_GROUP_FORECAST_TODAY = "forecastToday";
57 public static final String CHANNEL_GROUP_FORECAST_TOMORROW = "forecastTomorrow";
58 public static final String CHANNEL_GROUP_CURRENT_UVINDEX = "current";
60 // List of all channels
61 public static final String CHANNEL_STATION_ID = "id";
62 public static final String CHANNEL_STATION_NAME = "name";
63 public static final String CHANNEL_STATION_LOCATION = "location";
64 public static final String CHANNEL_TIME_STAMP = "time-stamp";
65 public static final String CHANNEL_CONDITION = "condition";
66 public static final String CHANNEL_CONDITION_ID = "condition-id";
67 public static final String CHANNEL_CONDITION_ICON = "icon";
68 public static final String CHANNEL_CONDITION_ICON_ID = "icon-id";
69 public static final String CHANNEL_TEMPERATURE = "temperature";
70 public static final String CHANNEL_APPARENT_TEMPERATURE = "apparent-temperature";
71 public static final String CHANNEL_MIN_TEMPERATURE = "min-temperature";
72 public static final String CHANNEL_MAX_TEMPERATURE = "max-temperature";
73 public static final String CHANNEL_PRESSURE = "pressure";
74 public static final String CHANNEL_HUMIDITY = "humidity";
75 public static final String CHANNEL_WIND_SPEED = "wind-speed";
76 public static final String CHANNEL_WIND_DIRECTION = "wind-direction";
77 public static final String CHANNEL_GUST_SPEED = "gust-speed";
78 public static final String CHANNEL_CLOUDINESS = "cloudiness";
79 public static final String CHANNEL_RAIN = "rain";
80 public static final String CHANNEL_SNOW = "snow";
81 public static final String CHANNEL_VISIBILITY = "visibility";
82 public static final String CHANNEL_UVINDEX = "uvindex";
84 // List of all configuration
85 public static final String CONFIG_FORECAST_DAYS = "forecastDays";