2 * Copyright (c) 2010-2022 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.darksky.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 DarkSkyBindingConstants} class defines common constants, which are used across the whole binding.
22 * @author Christoph Weitkamp - Initial contribution
25 public class DarkSkyBindingConstants {
27 public static final String BINDING_ID = "darksky";
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");
39 // List of all properties
40 public static final String CONFIG_API_KEY = "apikey";
41 public static final String CONFIG_LANGUAGE = "language";
42 public static final String CONFIG_LOCATION = "location";
44 // Channel group types
45 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_HOURLY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
47 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_DAILY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
49 public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ALERTS = new ChannelGroupTypeUID(BINDING_ID, "alerts");
51 // List of all channel groups
52 public static final String CHANNEL_GROUP_CURRENT_WEATHER = "current";
53 public static final String CHANNEL_GROUP_FORECAST_TODAY = "forecastToday";
54 public static final String CHANNEL_GROUP_FORECAST_TOMORROW = "forecastTomorrow";
55 public static final String CHANNEL_GROUP_ALERTS = "alerts";
57 // List of all channels
58 public static final String CHANNEL_TIME_STAMP = "time-stamp";
59 public static final String CHANNEL_CONDITION = "condition";
60 public static final String CHANNEL_CONDITION_ICON = "icon";
61 public static final String CHANNEL_CONDITION_ICON_ID = "icon-id";
62 public static final String CHANNEL_TEMPERATURE = "temperature";
63 public static final String CHANNEL_MIN_TEMPERATURE = "min-temperature";
64 public static final String CHANNEL_MAX_TEMPERATURE = "max-temperature";
65 public static final String CHANNEL_APPARENT_TEMPERATURE = "apparent-temperature";
66 public static final String CHANNEL_MIN_APPARENT_TEMPERATURE = "min-apparent-temperature";
67 public static final String CHANNEL_MAX_APPARENT_TEMPERATURE = "max-apparent-temperature";
68 public static final String CHANNEL_PRESSURE = "pressure";
69 public static final String CHANNEL_HUMIDITY = "humidity";
70 public static final String CHANNEL_WIND_SPEED = "wind-speed";
71 public static final String CHANNEL_WIND_DIRECTION = "wind-direction";
72 public static final String CHANNEL_GUST_SPEED = "gust-speed";
73 public static final String CHANNEL_CLOUDINESS = "cloudiness";
74 public static final String CHANNEL_VISIBILITY = "visibility";
75 public static final String CHANNEL_RAIN = "rain";
76 public static final String CHANNEL_SNOW = "snow";
77 public static final String CHANNEL_PRECIPITATION_INTENSITY = "precip-intensity";
78 public static final String CHANNEL_PRECIPITATION_PROBABILITY = "precip-probability";
79 public static final String CHANNEL_PRECIPITATION_TYPE = "precip-type";
80 public static final String CHANNEL_UVINDEX = "uvindex";
81 public static final String CHANNEL_OZONE = "ozone";
82 public static final String CHANNEL_SUNRISE = "sunrise";
83 public static final String CHANNEL_SUNSET = "sunset";
84 public static final String CHANNEL_ALERT_TITLE = "title";
85 public static final String CHANNEL_ALERT_ISSUED = "issued";
86 public static final String CHANNEL_ALERT_EXPIRES = "expires";
87 public static final String CHANNEL_ALERT_DESCRIPTION = "description";
88 public static final String CHANNEL_ALERT_SEVERITY = "severity";
89 public static final String CHANNEL_ALERT_URI = "uri";
91 public static final String TRIGGER_SUNRISE = CHANNEL_GROUP_CURRENT_WEATHER + "#sunrise-event";
92 public static final String TRIGGER_SUNSET = CHANNEL_GROUP_CURRENT_WEATHER + "#sunset-event";
94 public static final String EVENT_START = "START";