2 * Copyright (c) 2010-2021 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");
39 // One Call API forecast
40 public static final ThingTypeUID THING_TYPE_ONECALL_WEATHER_AND_FORECAST = new ThingTypeUID(BINDING_ID, "onecall");
41 // One Call API historical data
42 public static final ThingTypeUID THING_TYPE_ONECALL_HISTORY = new ThingTypeUID(BINDING_ID, "onecall-history");
44 // List of all properties
45 public static final String CONFIG_API_KEY = "apikey";
46 public static final String CONFIG_LANGUAGE = "language";
47 public static final String CONFIG_LOCATION = "location";
49 // Channel group types
50 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_STATION = new ChannelGroupTypeUID(BINDING_ID, "station");
51 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_HOURLY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
53 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_DAILY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
55 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_UVINDEX_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
57 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ONECALL_MINUTELY_FORECAST = new ChannelGroupTypeUID(
58 BINDING_ID, "oneCallMinutely");
59 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ONECALL_HOURLY_FORECAST = new ChannelGroupTypeUID(
60 BINDING_ID, "oneCallHourly");
61 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ONECALL_DAILY_FORECAST = new ChannelGroupTypeUID(
62 BINDING_ID, "oneCallDaily");
63 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ONECALL_CURRENT = new ChannelGroupTypeUID(BINDING_ID,
66 // List of all channel groups
67 public static final String CHANNEL_GROUP_STATION = "station";
68 public static final String CHANNEL_GROUP_CURRENT_WEATHER = "current";
69 public static final String CHANNEL_GROUP_FORECAST_TODAY = "forecastToday";
70 public static final String CHANNEL_GROUP_FORECAST_TOMORROW = "forecastTomorrow";
71 public static final String CHANNEL_GROUP_CURRENT_UVINDEX = "current";
72 public static final String CHANNEL_GROUP_ONECALL_CURRENT = "current";
73 public static final String CHANNEL_GROUP_ONECALL_HISTORY = "history";
74 public static final String CHANNEL_GROUP_ONECALL_TODAY = "forecastToday";
75 public static final String CHANNEL_GROUP_ONECALL_TOMORROW = "forecastTomorrow";
77 // List of all channels
78 public static final String CHANNEL_STATION_ID = "id";
79 public static final String CHANNEL_STATION_NAME = "name";
80 public static final String CHANNEL_STATION_LOCATION = "location";
81 public static final String CHANNEL_TIME_STAMP = "time-stamp";
82 public static final String CHANNEL_SUNRISE = "sunrise";
83 public static final String CHANNEL_SUNSET = "sunset";
84 public static final String CHANNEL_CONDITION = "condition";
85 public static final String CHANNEL_CONDITION_ID = "condition-id";
86 public static final String CHANNEL_CONDITION_ICON = "icon";
87 public static final String CHANNEL_CONDITION_ICON_ID = "icon-id";
88 public static final String CHANNEL_TEMPERATURE = "temperature";
89 public static final String CHANNEL_APPARENT_TEMPERATURE = "apparent-temperature";
90 public static final String CHANNEL_APPARENT_MORNING = "apparent-morning";
91 public static final String CHANNEL_APPARENT_DAY = "apparent-day";
92 public static final String CHANNEL_APPARENT_EVENING = "apparent-evening";
93 public static final String CHANNEL_APPARENT_NIGHT = "apparent-night";
94 public static final String CHANNEL_MIN_TEMPERATURE = "min-temperature";
95 public static final String CHANNEL_MAX_TEMPERATURE = "max-temperature";
96 public static final String CHANNEL_MORNING_TEMPERATURE = "morning-temperature";
97 public static final String CHANNEL_DAY_TEMPERATURE = "day-temperature";
98 public static final String CHANNEL_EVENING_TEMPERATURE = "evening-temperature";
99 public static final String CHANNEL_NIGHT_TEMPERATURE = "night-temperature";
100 public static final String CHANNEL_DEW_POINT = "dew-point";
101 public static final String CHANNEL_PRESSURE = "pressure";
102 public static final String CHANNEL_HUMIDITY = "humidity";
103 public static final String CHANNEL_WIND_SPEED = "wind-speed";
104 public static final String CHANNEL_WIND_DIRECTION = "wind-direction";
105 public static final String CHANNEL_GUST_SPEED = "gust-speed";
106 public static final String CHANNEL_CLOUDINESS = "cloudiness";
107 public static final String CHANNEL_PRECIP_PROBABILITY = "precip-probability";
108 public static final String CHANNEL_RAIN = "rain";
109 public static final String CHANNEL_SNOW = "snow";
110 public static final String CHANNEL_VISIBILITY = "visibility";
111 public static final String CHANNEL_UVINDEX = "uvindex";
112 public static final String CHANNEL_PRECIPITATION = "precipitation";
114 // List of all configuration
115 public static final String CONFIG_FORECAST_DAYS = "forecastDays";