]> git.basschouten.com Git - openhab-addons.git/commitdiff
[openweathermap] Code clean-up (#16369)
authorFlorian Hotze <florianh_dev@icloud.com>
Thu, 15 Feb 2024 13:29:51 +0000 (14:29 +0100)
committerGitHub <noreply@github.com>
Thu, 15 Feb 2024 13:29:51 +0000 (14:29 +0100)
* [openweathermap] Remove UV Index Thing

The UV Index API has been retired on 1st April 2021 and replaced by OneCall API 3.0.
Therefore, this Thing is not working anymore and can be removed from the source code.

* [openweathermap] Clean-Up DTOs

- Improve class JavaDoc.
- Remove setters as they are not needed. (All OWM APIs get required the data as query params.)

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
43 files changed:
bundles/org.openhab.binding.openweathermap/README.md
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/OpenWeatherMapBindingConstants.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/config/OpenWeatherMapUVIndexConfiguration.java [deleted file]
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/connection/OpenWeatherMapConnection.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapJsonAirPollutionData.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapJsonDailyForecastData.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapJsonHourlyForecastData.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapJsonUVIndexData.java [deleted file]
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapJsonWeatherData.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapOneCallAPIData.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapOneCallHistAPIData.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/airpollution/Components.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/airpollution/List.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/airpollution/Main.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/base/City.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/base/Clouds.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/base/Coord.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/base/Precipitation.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/base/Weather.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/base/Wind.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/forecast/daily/FeelsLikeTemp.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/forecast/daily/List.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/forecast/daily/Temp.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/forecast/hourly/List.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/forecast/hourly/Main.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/forecast/hourly/Sys.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/onecall/Alert.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/onecall/Current.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/onecall/Daily.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/onecall/Hourly.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/onecall/Minutely.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/onecall/Precipitation.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/onecall/Weather.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/onecallhist/Hourly.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/weather/Main.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/weather/Sys.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/factory/OpenWeatherMapHandlerFactory.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/AbstractOpenWeatherMapHandler.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapOneCallHandler.java
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapUVIndexHandler.java [deleted file]
bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap.properties
bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/thing/channel-types.xml
bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/thing/thing-types.xml

index 23eb14c0723b95ded2b82b1726c7b1ea6d64871a..2b5aecb95ff1a6edb39cb987a92f5c29516f8afd 100644 (file)
@@ -21,17 +21,6 @@ You can add as many `weather-and-forecast` things for different locations to you
 The binding tries to request daily forecast data from the OpenWeatherMap API.
 If the request fails, all daily forecast channel groups will be removed from the thing and further request will be omitted.
 
-### Current UV Index And Forecast
-
-::: tip Note
-The product will retire on 1st April 2021, please find UV data in the One Call API.
-One Call API includes current, hourly forecast for 7 days and 5 days historical UV data.
-:::
-
-The third thing `uvindex` supports the [current UV Index](https://openweathermap.org/api/uvi#current) and [forecasted UV Index](https://openweathermap.org/api/uvi#forecast) for a specific location.
-It requires coordinates of the location of your interest.
-You can add as much `uvindex` things for different locations to your setup as you like to observe.
-
 ### Current And Forecasted Air Pollution
 
 Another thing is the `air-pollution` which provides the [current air pollution](https://openweathermap.org/api/air-pollution) and [forecasted air pollution](https://openweathermap.org/api/air-pollution#forecast) for a specific location.
@@ -84,15 +73,6 @@ Once the system location will be changed, the background discovery updates the c
 
 Once the parameters `forecastHours` or `forecastDays` will be changed, the available channel groups on the thing will be created or removed accordingly.
 
-### Current UV Index And Forecast
-
-| Parameter      | Description                                                                                                                      |
-|----------------|----------------------------------------------------------------------------------------------------------------------------------|
-| location       | Location of weather in geographical coordinates (latitude/longitude/altitude). **Mandatory**                                     |
-| forecastDays   | Number of days for UV Index forecast (including todays forecast). Optional, the default value is 6 (min="1", max="8", step="1"). |
-
-Once the parameter `forecastDays` will be changed, the available channel groups on the thing will be created or removed accordingly.
-
 ### Current Air Pollution And Forecast
 
 | Parameter      | Description                                                                                                                    |
@@ -257,15 +237,6 @@ In a future release, the `forecastToday` to `forecastDay7` channel groups won't
 | alerts1, alerts2, ... | expires     | DateTime  | End Date and Time for which the warning is valid.   |
 | alerts1, alerts2, ... | source      | String    | The source of the alert. **Advanced**               |
 
-### UV Index
-
-| Channel Group ID                                          | Channel ID | Item Type | Description                          |
-|-----------------------------------------------------------|------------|-----------|--------------------------------------|
-| current, forecastTomorrow, forecastDay2, ... forecastDay7 | time-stamp | DateTime  | Date of data observation / forecast. |
-| current, forecastTomorrow, forecastDay2, ... forecastDay7 | uvindex    | Number    | Current or forecasted UV Index.      |
-
-The `uvindex` channel is also available in the current data and the daily forecast of the One Call API.
-
 ### Air Pollution
 
 | Channel Group ID                                                | Channel ID             | Item Type      | Description                                                              |
index f7a8a3537393f29824db9258d618f6f0450af7c8..b614aab1aeef8ecd018bb89fb4f234154a390974 100644 (file)
@@ -35,7 +35,6 @@ public class OpenWeatherMapBindingConstants {
     // Thing
     public static final ThingTypeUID THING_TYPE_WEATHER_AND_FORECAST = new ThingTypeUID(BINDING_ID,
             "weather-and-forecast");
-    public static final ThingTypeUID THING_TYPE_UVINDEX = new ThingTypeUID(BINDING_ID, "uvindex");
     public static final ThingTypeUID THING_TYPE_AIR_POLLUTION = new ThingTypeUID(BINDING_ID, "air-pollution");
     // One Call API forecast
     public static final ThingTypeUID THING_TYPE_ONECALL_WEATHER_AND_FORECAST = new ThingTypeUID(BINDING_ID, "onecall");
@@ -53,8 +52,6 @@ public class OpenWeatherMapBindingConstants {
             "hourlyForecast");
     public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_DAILY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
             "dailyForecast");
-    public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_UVINDEX_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
-            "uvindexForecast");
     public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_AIR_POLLUTION_FORECAST = new ChannelGroupTypeUID(
             BINDING_ID, "airPollutionForecast");
     public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ONECALL_MINUTELY_FORECAST = new ChannelGroupTypeUID(
@@ -73,7 +70,6 @@ public class OpenWeatherMapBindingConstants {
     public static final String CHANNEL_GROUP_CURRENT_WEATHER = "current";
     public static final String CHANNEL_GROUP_FORECAST_TODAY = "forecastToday";
     public static final String CHANNEL_GROUP_FORECAST_TOMORROW = "forecastTomorrow";
-    public static final String CHANNEL_GROUP_CURRENT_UVINDEX = "current";
     public static final String CHANNEL_GROUP_CURRENT_AIR_POLLUTION = "current";
     public static final String CHANNEL_GROUP_ONECALL_CURRENT = "current";
     public static final String CHANNEL_GROUP_ONECALL_HISTORY = "history";
diff --git a/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/config/OpenWeatherMapUVIndexConfiguration.java b/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/config/OpenWeatherMapUVIndexConfiguration.java
deleted file mode 100644 (file)
index 33595d3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.openweathermap.internal.config;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapUVIndexHandler;
-
-/**
- * The {@link OpenWeatherMapUVIndexConfiguration} is the class used to match the
- * {@link OpenWeatherMapUVIndexHandler}s configuration.
- *
- * @author Christoph Weitkamp - Initial contribution
- */
-@NonNullByDefault
-public class OpenWeatherMapUVIndexConfiguration extends OpenWeatherMapLocationConfiguration {
-    public int forecastDays;
-}
index 08bde19187f160cbaeb9421b7f24a93c8fba7189..8efc1e8d5a47eca5030788b4fbec2212dbc610ae 100644 (file)
@@ -20,7 +20,6 @@ import java.nio.charset.StandardCharsets;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -38,7 +37,6 @@ import org.openhab.binding.openweathermap.internal.config.OpenWeatherMapAPIConfi
 import org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapJsonAirPollutionData;
 import org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapJsonDailyForecastData;
 import org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapJsonHourlyForecastData;
-import org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapJsonUVIndexData;
 import org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapJsonWeatherData;
 import org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapOneCallAPIData;
 import org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapOneCallHistAPIData;
@@ -88,9 +86,6 @@ public class OpenWeatherMapConnection {
     private static final String THREE_HOUR_FORECAST_URL = "https://api.openweathermap.org/data/2.5/forecast";
     // 16 day / daily forecast (see https://openweathermap.org/forecast16)
     private static final String DAILY_FORECAST_URL = "https://api.openweathermap.org/data/2.5/forecast/daily";
-    // UV Index (see https://openweathermap.org/api/uvi)
-    private static final String UVINDEX_URL = "https://api.openweathermap.org/data/2.5/uvi";
-    private static final String UVINDEX_FORECAST_URL = "https://api.openweathermap.org/data/2.5/uvi/forecast";
     // Air Pollution (see https://openweathermap.org/api/air-pollution)
     private static final String AIR_POLLUTION_URL = "https://api.openweathermap.org/data/2.5/air_pollution";
     private static final String AIR_POLLUTION_FORECAST_URL = "https://api.openweathermap.org/data/2.5/air_pollution/forecast";
@@ -181,46 +176,6 @@ public class OpenWeatherMapConnection {
                 OpenWeatherMapJsonDailyForecastData.class);
     }
 
-    /**
-     * Requests the UV Index data for the given location (see https://openweathermap.org/api/uvi).
-     *
-     * @param location location represented as {@link PointType}
-     * @return the UV Index data
-     * @throws JsonSyntaxException
-     * @throws CommunicationException
-     * @throws ConfigurationException
-     */
-    public synchronized @Nullable OpenWeatherMapJsonUVIndexData getUVIndexData(@Nullable PointType location)
-            throws JsonSyntaxException, CommunicationException, ConfigurationException {
-        return gson.fromJson(
-                getResponseFromCache(
-                        buildURL(UVINDEX_URL, getRequestParams(handler.getOpenWeatherMapAPIConfig(), location))),
-                OpenWeatherMapJsonUVIndexData.class);
-    }
-
-    /**
-     * Requests the UV Index forecast data for the given location (see https://openweathermap.org/api/uvi).
-     *
-     * @param location location represented as {@link PointType}
-     * @return the UV Index forecast data
-     * @throws JsonSyntaxException
-     * @throws CommunicationException
-     * @throws ConfigurationException
-     */
-    public synchronized @Nullable List<OpenWeatherMapJsonUVIndexData> getUVIndexForecastData(
-            @Nullable PointType location, int count)
-            throws JsonSyntaxException, CommunicationException, ConfigurationException {
-        if (count <= 0) {
-            throw new ConfigurationException("@text/offline.conf-error-not-supported-uvindex-number-of-days");
-        }
-
-        Map<String, String> params = getRequestParams(handler.getOpenWeatherMapAPIConfig(), location);
-        params.put(PARAM_FORECAST_CNT, Integer.toString(count));
-
-        return Arrays.asList(gson.fromJson(getResponseFromCache(buildURL(UVINDEX_FORECAST_URL, params)),
-                OpenWeatherMapJsonUVIndexData[].class));
-    }
-
     /**
      * Requests the Air Pollution data for the given location (see https://openweathermap.org/api/air-pollution).
      *
index ac09d09c0942611a9378313db75f579032cc04a7..bd711a8fcf3d3b28d0967f9b0c5f06bfa5d55ec6 100644 (file)
@@ -16,8 +16,8 @@ import org.openhab.binding.openweathermap.internal.dto.airpollution.List;
 import org.openhab.binding.openweathermap.internal.dto.base.Coord;
 
 /**
- * The {@link OpenWeatherMapJsonAirPollutionData} is the Java class used to map the JSON response to an OpenWeatherMap
- * request.
+ * Holds the data from the deserialised JSON response of the <a href="https://openweathermap.org/api/air-pollution">Air
+ * Pollution API</a>.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
index 760a5b53e8c8a0290dd326c59630c7b6038f9f09..a9f97756e11ea01adb6e3b1a320f4d285ac4836b 100644 (file)
@@ -16,8 +16,8 @@ import org.openhab.binding.openweathermap.internal.dto.base.City;
 import org.openhab.binding.openweathermap.internal.dto.forecast.daily.List;
 
 /**
- * The {@link OpenWeatherMapJsonDailyForecastData} is the Java class used to map the JSON response to an OpenWeatherMap
- * request.
+ * Holds the data from the deserialised JSON response of the <a href="https://openweathermap.org/forecast16">Daily
+ * Forecast 16 Days API</a>.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
@@ -32,39 +32,19 @@ public class OpenWeatherMapJsonDailyForecastData {
         return city;
     }
 
-    public void setCity(City city) {
-        this.city = city;
-    }
-
     public String getCod() {
         return cod;
     }
 
-    public void setCod(String cod) {
-        this.cod = cod;
-    }
-
     public Double getMessage() {
         return message;
     }
 
-    public void setMessage(Double message) {
-        this.message = message;
-    }
-
     public Integer getCnt() {
         return cnt;
     }
 
-    public void setCnt(Integer cnt) {
-        this.cnt = cnt;
-    }
-
     public java.util.List<List> getList() {
         return list;
     }
-
-    public void setList(java.util.List<List> list) {
-        this.list = list;
-    }
 }
index 8c21fa0230fd4876f0da7cac4bb34b55095e4e21..7c7b0441d86be985d9025d39fca51e595787f84c 100644 (file)
@@ -16,8 +16,9 @@ import org.openhab.binding.openweathermap.internal.dto.base.City;
 import org.openhab.binding.openweathermap.internal.dto.forecast.hourly.List;
 
 /**
- * The {@link OpenWeatherMapJsonHourlyForecastData} is the Java class used to map the JSON response to an OpenWeatherMap
- * request.
+ * Holds the data from the deserialised JSON response of the
+ * <a href="https://openweathermap.org/api/hourly-forecast">Hourly forecast API</a> and the
+ * <a href="https://openweathermap.org/forecast5">5 day weather forecast API</a>.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
diff --git a/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapJsonUVIndexData.java b/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/dto/OpenWeatherMapJsonUVIndexData.java
deleted file mode 100644 (file)
index 5ca61d8..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.openweathermap.internal.dto;
-
-import com.google.gson.annotations.SerializedName;
-
-/**
- * The {@link OpenWeatherMapJsonUVIndexData} is the Java class used to map the JSON response to an OpenWeatherMap
- * request.
- *
- * @author Christoph Weitkamp - Initial contribution
- */
-public class OpenWeatherMapJsonUVIndexData {
-    private Double lat;
-    private Double lon;
-    @SerializedName("date_iso")
-    private String dateIso;
-    private Integer date;
-    private Double value;
-
-    public Double getLat() {
-        return lat;
-    }
-
-    public void setLat(Double lat) {
-        this.lat = lat;
-    }
-
-    public Double getLon() {
-        return lon;
-    }
-
-    public void setLon(Double lon) {
-        this.lon = lon;
-    }
-
-    public String getDateIso() {
-        return dateIso;
-    }
-
-    public void setDateIso(String dateIso) {
-        this.dateIso = dateIso;
-    }
-
-    public Integer getDate() {
-        return date;
-    }
-
-    public void setDate(Integer date) {
-        this.date = date;
-    }
-
-    public Double getValue() {
-        return value;
-    }
-
-    public void setValue(Double value) {
-        this.value = value;
-    }
-}
index 3378fbcdb95d671efdf400facd093dc207c18807..6f9af2ae2bf43196b8fde54be9a7550d4debb4e3 100644 (file)
@@ -24,8 +24,8 @@ import org.openhab.binding.openweathermap.internal.dto.weather.Main;
 import org.openhab.binding.openweathermap.internal.dto.weather.Sys;
 
 /**
- * The {@link OpenWeatherMapJsonWeatherData} is the Java class used to map the JSON response to an OpenWeatherMap
- * request.
+ * Holds the data from the deserialised JSON response of the <a href="https://openweathermap.org/current">Current
+ * weather data API</a>
  *
  * @author Christoph Weitkamp - Initial contribution
  */
index aa751896feeefeb73af1ab172211a46bb83ec7a0..cf3b26334ff17db8d917af453c5945c02c5a7e65 100644 (file)
@@ -24,12 +24,9 @@ import org.openhab.binding.openweathermap.internal.dto.onecall.Minutely;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the data from the deserialised JSON response of the One Call APIs.
+ * See <a href="https://openweathermap.org/api/one-call-3">One Call API 3.0.</a> and
+ * <a href="https://openweathermap.org/api/one-call-api">One Call API 2.5</a>.
  *
  * @author Wolfgang Klimt - Initial contribution
  * @author Christoph Weitkamp - Added weather alerts
@@ -51,63 +48,31 @@ public class OpenWeatherMapOneCallAPIData {
         return lat;
     }
 
-    public void setLat(double lat) {
-        this.lat = lat;
-    }
-
     public double getLon() {
         return lon;
     }
 
-    public void setLon(double lon) {
-        this.lon = lon;
-    }
-
     public String getTimezone() {
         return timezone;
     }
 
-    public void setTimezone(String timezone) {
-        this.timezone = timezone;
-    }
-
     public int getTimezoneOffset() {
         return timezoneOffset;
     }
 
-    public void setTimezoneOffset(int timezoneOffset) {
-        this.timezoneOffset = timezoneOffset;
-    }
-
     public Current getCurrent() {
         return current;
     }
 
-    public void setCurrent(Current current) {
-        this.current = current;
-    }
-
     public List<Minutely> getMinutely() {
         return minutely;
     }
 
-    public void setMinutely(List<Minutely> minutely) {
-        this.minutely = minutely;
-    }
-
     public List<Hourly> getHourly() {
         return hourly;
     }
 
-    public void setHourly(List<Hourly> hourly) {
-        this.hourly = hourly;
-    }
-
     public List<Daily> getDaily() {
         return daily;
     }
-
-    public void setDaily(List<Daily> daily) {
-        this.daily = daily;
-    }
 }
index e92a9804d3d807bb19da23c70e83fe733dd694ed..6efafe12e499739855e74c027004fad210943861 100644 (file)
@@ -20,12 +20,9 @@ import org.openhab.binding.openweathermap.internal.dto.onecallhist.Hourly;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the historical data from the deserialised JSON response of the One Call APIs.
+ * See <a href="https://openweathermap.org/api/one-call-3">One Call API 3.0.</a> and
+ * <a href="https://openweathermap.org/api/one-call-api">One Call API 2.5</a>.
  *
  * @author Wolfgang Klimt - Initial contribution
  */
index ade8fcd5a01f76c20d741d5866852897e62c4acb..73ae37f119b23ebd9b3cc805647e09376c0500ab 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.openweathermap.internal.dto.airpollution;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Generated Plain Old Java Objects class for {@link Components} from JSON.
+ * Holds the data from the <code>components</code> object of the JSON response of the Air Pollution API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
index 5e86e5d4b9b422a0b46ca62fe864edf99ec7ad1f..9df66afafa319c2d180db4349a0f47ae3a221f6e 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.openweathermap.internal.dto.airpollution;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Generated Plain Old Java Objects class for {@link List} from JSON.
+ * Holds the data from the <code>list</code> object of the JSON response of the Air Pollution API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
index ac80038b02da3bfc61f8fd3276b28b1e36e99ddf..bbca1a37f1d48b663f2ddcf9c8bef2193dcdb3bf 100644 (file)
@@ -15,7 +15,7 @@ package org.openhab.binding.openweathermap.internal.dto.airpollution;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Generated Plain Old Java Objects class for {@link Main} from JSON.
+ * Holds the data from the <code>main</code> object of the JSON response of the Air Pollution API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
index 76a90f4346308489f2b6e734c6f49ac4b10264fa..2074cf51f45d828c664fd07bf54d5d12cb4822cb 100644 (file)
@@ -28,39 +28,19 @@ public class City {
         return id;
     }
 
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
     public String getName() {
         return name;
     }
 
-    public void setName(String name) {
-        this.name = name;
-    }
-
     public Coord getCoord() {
         return coord;
     }
 
-    public void setCoord(Coord coord) {
-        this.coord = coord;
-    }
-
     public String getCountry() {
         return country;
     }
 
-    public void setCountry(String country) {
-        this.country = country;
-    }
-
     public Integer getPopulation() {
         return population;
     }
-
-    public void setPopulation(Integer population) {
-        this.population = population;
-    }
 }
index b2cf854fc7fe0252d887b26d21b72e7d75c7cabb..6f10f3c75e4a7bc1e56df738b0ba89cce1a29626 100644 (file)
@@ -23,8 +23,4 @@ public class Clouds {
     public Integer getAll() {
         return all;
     }
-
-    public void setAll(Integer all) {
-        this.all = all;
-    }
 }
index b2cbbbefa3871c72bcfae41e6a1a2d05af985846..e24f6dc692071013dee6e7d8076b1d3f4ece8eac 100644 (file)
@@ -13,7 +13,7 @@
 package org.openhab.binding.openweathermap.internal.dto.base;
 
 /**
- * Generated Plain Old Java Objects class for {@link Coord} from JSON.
+ * Holds the data from the <code>coord</code> object of the JSON response.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
@@ -25,15 +25,7 @@ public class Coord {
         return lon;
     }
 
-    public void setLon(Double lon) {
-        this.lon = lon;
-    }
-
     public Double getLat() {
         return lat;
     }
-
-    public void setLat(Double lat) {
-        this.lat = lat;
-    }
 }
index 65574a9833c41c4665f07bf93097766ef6148772..ad0cb40bc6437c5f0a7db9c13a549ce308f29512 100644 (file)
@@ -31,18 +31,10 @@ public class Precipitation {
         return oneHour;
     }
 
-    public void set1h(Double oneHour) {
-        this.oneHour = oneHour;
-    }
-
     public @Nullable Double get3h() {
         return threeHours;
     }
 
-    public void set3h(Double threeHours) {
-        this.threeHours = threeHours;
-    }
-
     public Double getVolume() {
         return oneHour != null ? oneHour : threeHours != null ? threeHours / 3 : 0;
     }
index d6cd231a3f459dafe9876f4b3bae3f3da64cca3d..e6f596ba0952521cd4f6953705a14191d1c792b0 100644 (file)
@@ -27,31 +27,15 @@ public class Weather {
         return id;
     }
 
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
     public String getMain() {
         return main;
     }
 
-    public void setMain(String main) {
-        this.main = main;
-    }
-
     public String getDescription() {
         return description;
     }
 
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
     public String getIcon() {
         return icon;
     }
-
-    public void setIcon(String icon) {
-        this.icon = icon;
-    }
 }
index 9c14c40fe46c0fb56277340340bea0cfd0bcb936..d70c89f9862ec16bd3ba9f8fb29bf60cab6b62ba 100644 (file)
@@ -28,23 +28,11 @@ public class Wind {
         return speed;
     }
 
-    public void setSpeed(Double speed) {
-        this.speed = speed;
-    }
-
     public Double getDeg() {
         return deg;
     }
 
-    public void setDeg(Double deg) {
-        this.deg = deg;
-    }
-
     public @Nullable Double getGust() {
         return gust;
     }
-
-    public void setGust(Double gust) {
-        this.gust = speed;
-    }
 }
index ba314385d6fb1ca695788c12a02945f6bfc2ff95..0c0575ea8654d3fe087a21d2c8acb3beba7b3f7c 100644 (file)
@@ -13,7 +13,7 @@
 package org.openhab.binding.openweathermap.internal.dto.forecast.daily;
 
 /**
- * Generated Plain Old Java Objects class for {@link FeelsLikeTemp} from JSON.
+ * Holds the data from the <code>feels_like</code> object of the JSON response of the Daily Forecast 16 Days API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
@@ -27,31 +27,15 @@ public class FeelsLikeTemp {
         return day;
     }
 
-    public void setDay(Double day) {
-        this.day = day;
-    }
-
     public Double getNight() {
         return night;
     }
 
-    public void setNight(Double night) {
-        this.night = night;
-    }
-
     public Double getEve() {
         return eve;
     }
 
-    public void setEve(Double eve) {
-        this.eve = eve;
-    }
-
     public Double getMorn() {
         return morn;
     }
-
-    public void setMorn(Double morn) {
-        this.morn = morn;
-    }
 }
index 47f853d302779620f61e2c86d3abb7369b69886f..f783c951aac5d79c534f6074e173f1dbe3d16267 100644 (file)
@@ -18,7 +18,7 @@ import org.openhab.binding.openweathermap.internal.dto.base.Weather;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Generated Plain Old Java Objects class for {@link List} from JSON.
+ * Holds the data from the <code>list</code> object of the JSON response of the Daily Forecast 16 Days API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
@@ -44,119 +44,59 @@ public class List {
         return dt;
     }
 
-    public void setDt(Integer dt) {
-        this.dt = dt;
-    }
-
     public @Nullable Integer getSunrise() {
         return sunrise;
     }
 
-    public void setSunrise(Integer sunrise) {
-        this.sunrise = sunrise;
-    }
-
     public @Nullable Integer getSunset() {
         return sunset;
     }
 
-    public void setSunset(Integer sunset) {
-        this.sunset = sunset;
-    }
-
     public Temp getTemp() {
         return temp;
     }
 
-    public void setTemp(Temp temp) {
-        this.temp = temp;
-    }
-
     public @Nullable FeelsLikeTemp getFeelsLike() {
         return feelsLikeTemp;
     }
 
-    public void setFeelsLike(FeelsLikeTemp feelsLikeTemp) {
-        this.feelsLikeTemp = feelsLikeTemp;
-    }
-
     public Double getPressure() {
         return pressure;
     }
 
-    public void setPressure(Double pressure) {
-        this.pressure = pressure;
-    }
-
     public Integer getHumidity() {
         return humidity;
     }
 
-    public void setHumidity(Integer humidity) {
-        this.humidity = humidity;
-    }
-
     public java.util.List<Weather> getWeather() {
         return weather;
     }
 
-    public void setWeather(java.util.List<Weather> weather) {
-        this.weather = weather;
-    }
-
     public Double getSpeed() {
         return speed;
     }
 
-    public void setSpeed(Double speed) {
-        this.speed = speed;
-    }
-
     public Double getDeg() {
         return deg;
     }
 
-    public void setDeg(Double deg) {
-        this.deg = deg;
-    }
-
     public @Nullable Double getGust() {
         return gust;
     }
 
-    public void setGust(Double gust) {
-        this.gust = speed;
-    }
-
     public Integer getClouds() {
         return clouds;
     }
 
-    public void setClouds(Integer clouds) {
-        this.clouds = clouds;
-    }
-
     public @Nullable Double getRain() {
         return rain;
     }
 
-    public void setRain(Double rain) {
-        this.rain = rain;
-    }
-
     public @Nullable Double getSnow() {
         return snow;
     }
 
-    public void setSnow(Double snow) {
-        this.snow = snow;
-    }
-
     public @Nullable Double getPop() {
         return pop;
     }
-
-    public void setPop(Double pop) {
-        this.pop = pop;
-    }
 }
index e9d16f52c5f776861bfea39abb76c33c0cd310a1..19109080eb99596c52469763fcebd6dfecbfcfea 100644 (file)
@@ -13,7 +13,7 @@
 package org.openhab.binding.openweathermap.internal.dto.forecast.daily;
 
 /**
- * Generated Plain Old Java Objects class for {@link Temp} from JSON.
+ * Holds the data from the <code>temp</code> object of the JSON response of the Daily Forecast 16 Days API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
@@ -29,47 +29,23 @@ public class Temp {
         return day;
     }
 
-    public void setDay(Double day) {
-        this.day = day;
-    }
-
     public Double getMin() {
         return min;
     }
 
-    public void setMin(Double min) {
-        this.min = min;
-    }
-
     public Double getMax() {
         return max;
     }
 
-    public void setMax(Double max) {
-        this.max = max;
-    }
-
     public Double getNight() {
         return night;
     }
 
-    public void setNight(Double night) {
-        this.night = night;
-    }
-
     public Double getEve() {
         return eve;
     }
 
-    public void setEve(Double eve) {
-        this.eve = eve;
-    }
-
     public Double getMorn() {
         return morn;
     }
-
-    public void setMorn(Double morn) {
-        this.morn = morn;
-    }
 }
index 5fd3f2c05b89471ce473e8710c843a2a4f8d6397..9c6bfe33fccc80282ce03a9ce15d3b80e1e632d4 100644 (file)
@@ -22,7 +22,8 @@ import org.openhab.binding.openweathermap.internal.dto.weather.Main;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Generated Plain Old Java Objects class for {@link List} from JSON.
+ * Holds the data from the <code>list</code> object of the JSON response of the Hourly forecast API and the 5 day
+ * weather forecast API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
@@ -42,71 +43,35 @@ public class List {
         return dt;
     }
 
-    public void setDt(Integer dt) {
-        this.dt = dt;
-    }
-
     public Main getMain() {
         return main;
     }
 
-    public void setMain(Main main) {
-        this.main = main;
-    }
-
     public java.util.List<Weather> getWeather() {
         return weather;
     }
 
-    public void setWeather(java.util.List<Weather> weather) {
-        this.weather = weather;
-    }
-
     public Clouds getClouds() {
         return clouds;
     }
 
-    public void setClouds(Clouds clouds) {
-        this.clouds = clouds;
-    }
-
     public Wind getWind() {
         return wind;
     }
 
-    public void setWind(Wind wind) {
-        this.wind = wind;
-    }
-
     public @Nullable Precipitation getRain() {
         return rain;
     }
 
-    public void setRain(Precipitation rain) {
-        this.rain = rain;
-    }
-
     public @Nullable Precipitation getSnow() {
         return snow;
     }
 
-    public void setSnow(Precipitation snow) {
-        this.snow = snow;
-    }
-
     public Sys getSys() {
         return sys;
     }
 
-    public void setSys(Sys sys) {
-        this.sys = sys;
-    }
-
     public String getDtTxt() {
         return dtTxt;
     }
-
-    public void setDtTxt(String dtTxt) {
-        this.dtTxt = dtTxt;
-    }
 }
index 149fabf03a98ce37c48716f7ebdd32a56d1ad211..15670419dd0fea008cdbde09f9222ad791929437 100644 (file)
@@ -17,7 +17,8 @@ import org.eclipse.jdt.annotation.Nullable;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Generated Plain Old Java Objects class for {@link Main} from JSON.
+ * Holds the data from the <code>main</code> object of the JSON response of the Hourly forecast API and the 5 day
+ * weather forecast API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
index ae85505785d8fcf9b39f64332bd79b6db84a4a08..620d5e61da59064ed2de6ac93c6cfd05e81ac445 100644 (file)
@@ -13,7 +13,8 @@
 package org.openhab.binding.openweathermap.internal.dto.forecast.hourly;
 
 /**
- * Generated Plain Old Java Objects class for {@link Sys} from JSON.
+ * Holds the data from the <code>pod</code> object of the JSON response of the Hourly forecast API and the 5 day weather
+ * forecast API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
index 08510b4ea97565299e875888fda059eb8ae0d367..70327de91cb9c179047c8d4dac73da624d39f9cd 100644 (file)
@@ -15,15 +15,35 @@ package org.openhab.binding.openweathermap.internal.dto.onecall;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Generated Plain Old Java Objects class for {@link Alert} from JSON.
+ * Holds the data from the <code>alerts</code> object of the JSON response of the One Call APIs.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
 public class Alert {
-    public String event;
-    public int start;
-    public int end;
-    public String description;
+    private String event;
+    private int start;
+    private int end;
+    private String description;
     @SerializedName("sender_name")
-    public String senderName;
+    private String senderName;
+
+    public String getEvent() {
+        return event;
+    }
+
+    public int getStart() {
+        return start;
+    }
+
+    public int getEnd() {
+        return end;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public String getSenderName() {
+        return senderName;
+    }
 }
index d6f360c0c59943a586036816b75d20facc1b8af7..46a43d18a416d8bd029dbda824e3772258a66275 100644 (file)
@@ -17,12 +17,7 @@ import java.util.List;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the data from the <code>current</code> object of the JSON response of the One Call APIs.
  *
  * @author Wolfgang Klimt - Initial contribution
  */
@@ -54,135 +49,67 @@ public class Current {
         return dt;
     }
 
-    public void setDt(int dt) {
-        this.dt = dt;
-    }
-
     public int getSunrise() {
         return sunrise;
     }
 
-    public void setSunrise(int sunrise) {
-        this.sunrise = sunrise;
-    }
-
     public int getSunset() {
         return sunset;
     }
 
-    public void setSunset(int sunset) {
-        this.sunset = sunset;
-    }
-
     public double getTemp() {
         return temp;
     }
 
-    public void setTemp(double temp) {
-        this.temp = temp;
-    }
-
     public double getFeelsLike() {
         return feelsLike;
     }
 
-    public void setFeelsLike(double feelsLike) {
-        this.feelsLike = feelsLike;
-    }
-
     public int getPressure() {
         return pressure;
     }
 
-    public void setPressure(int pressure) {
-        this.pressure = pressure;
-    }
-
     public int getHumidity() {
         return humidity;
     }
 
-    public void setHumidity(int humidity) {
-        this.humidity = humidity;
-    }
-
     public double getDewPoint() {
         return dewPoint;
     }
 
-    public void setDewPoint(double dewPoint) {
-        this.dewPoint = dewPoint;
-    }
-
     public double getUvi() {
         return uvi;
     }
 
-    public void setUvi(double uvi) {
-        this.uvi = uvi;
-    }
-
     public int getClouds() {
         return clouds;
     }
 
-    public void setClouds(int clouds) {
-        this.clouds = clouds;
-    }
-
     public int getVisibility() {
         return visibility;
     }
 
-    public void setVisibility(int visibility) {
-        this.visibility = visibility;
-    }
-
     public double getWindSpeed() {
         return windSpeed;
     }
 
-    public void setWindSpeed(double windSpeed) {
-        this.windSpeed = windSpeed;
-    }
-
     public int getWindDeg() {
         return windDeg;
     }
 
-    public void setWindDeg(int windDeg) {
-        this.windDeg = windDeg;
-    }
-
     public double getWindGust() {
         return windGust;
     }
 
-    public void setWindGust(double windGust) {
-        this.windGust = windGust;
-    }
-
     public List<Weather> getWeather() {
         return weather;
     }
 
-    public void setWeather(List<Weather> weather) {
-        this.weather = weather;
-    }
-
     public Precipitation getRain() {
         return rain;
     }
 
-    public void setRain(Precipitation rain) {
-        this.rain = rain;
-    }
-
     public Precipitation getSnow() {
         return snow;
     }
-
-    public void setSnow(Precipitation snow) {
-        this.snow = snow;
-    }
 }
index bb5a6775d7470831ebb96d0ebcbf70ae47bbdf29..edf312c7d8fb58fc6bde8a338be6b8e40bbacbdd 100644 (file)
@@ -20,12 +20,7 @@ import org.openhab.binding.openweathermap.internal.dto.forecast.daily.Temp;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the data from the <code>daily</code> object of the JSON response of the One Call APIs.
  *
  * @author Wolfgang Klimt - Initial contribution
  */
@@ -58,143 +53,71 @@ public class Daily {
         return dt;
     }
 
-    public void setDt(int dt) {
-        this.dt = dt;
-    }
-
     public int getSunrise() {
         return sunrise;
     }
 
-    public void setSunrise(int sunrise) {
-        this.sunrise = sunrise;
-    }
-
     public int getSunset() {
         return sunset;
     }
 
-    public void setSunset(int sunset) {
-        this.sunset = sunset;
-    }
-
     public Temp getTemp() {
         return temp;
     }
 
-    public void setTemp(Temp temp) {
-        this.temp = temp;
-    }
-
     public FeelsLikeTemp getFeelsLike() {
         return feelsLikeTemp;
     }
 
-    public void setFeelsLike(FeelsLikeTemp feelsLikeTemp) {
-        this.feelsLikeTemp = feelsLikeTemp;
-    }
-
     public int getPressure() {
         return pressure;
     }
 
-    public void setPressure(int pressure) {
-        this.pressure = pressure;
-    }
-
     public int getHumidity() {
         return humidity;
     }
 
-    public void setHumidity(int humidity) {
-        this.humidity = humidity;
-    }
-
     public double getDewPoint() {
         return dewPoint;
     }
 
-    public void setDewPoint(double dewPoint) {
-        this.dewPoint = dewPoint;
-    }
-
     public double getWindSpeed() {
         return windSpeed;
     }
 
-    public void setWindSpeed(double windSpeed) {
-        this.windSpeed = windSpeed;
-    }
-
     public int getWindDeg() {
         return windDeg;
     }
 
-    public void setWindDeg(int windDeg) {
-        this.windDeg = windDeg;
-    }
-
     public double getWindGust() {
         return windGust;
     }
 
-    public void setWindGust(double windGust) {
-        this.windGust = windGust;
-    }
-
     public List<Weather> getWeather() {
         return weather;
     }
 
-    public void setWeather(List<Weather> weather) {
-        this.weather = weather;
-    }
-
     public int getClouds() {
         return clouds;
     }
 
-    public void setClouds(int clouds) {
-        this.clouds = clouds;
-    }
-
     public double getPop() {
         return pop;
     }
 
-    public void setPop(double pop) {
-        this.pop = pop;
-    }
-
     public double getRain() {
         return rain;
     }
 
-    public void setRain(double rain) {
-        this.rain = rain;
-    }
-
     public double getUvi() {
         return uvi;
     }
 
-    public void setUvi(double uvi) {
-        this.uvi = uvi;
-    }
-
     public int getVisibility() {
         return visibility;
     }
 
-    public void setVisibility(int visibility) {
-        this.visibility = visibility;
-    }
-
     public double getSnow() {
         return snow;
     }
-
-    public void setSnow(double snow) {
-        this.snow = snow;
-    }
 }
index d6ca539988d2ddf9fa90a6aa8734f1ecf5c2fe69..146c16d3261991f96f787a0a71443fb515fe7b60 100644 (file)
@@ -17,12 +17,7 @@ import java.util.List;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the data from the <code>hourly</code> object of the JSON response of the One Call APIs.
  *
  * @author Wolfgang Klimt - Initial contribution
  */
@@ -52,119 +47,59 @@ public class Hourly {
         return dt;
     }
 
-    public void setDt(int dt) {
-        this.dt = dt;
-    }
-
     public double getTemp() {
         return temp;
     }
 
-    public void setTemp(double temp) {
-        this.temp = temp;
-    }
-
     public double getFeelsLike() {
         return feelsLike;
     }
 
-    public void setFeelsLike(double feelsLike) {
-        this.feelsLike = feelsLike;
-    }
-
     public int getPressure() {
         return pressure;
     }
 
-    public void setPressure(int pressure) {
-        this.pressure = pressure;
-    }
-
     public int getHumidity() {
         return humidity;
     }
 
-    public void setHumidity(int humidity) {
-        this.humidity = humidity;
-    }
-
     public double getDewPoint() {
         return dewPoint;
     }
 
-    public void setDewPoint(double dewPoint) {
-        this.dewPoint = dewPoint;
-    }
-
     public int getClouds() {
         return clouds;
     }
 
-    public void setClouds(int clouds) {
-        this.clouds = clouds;
-    }
-
     public int getVisibility() {
         return visibility;
     }
 
-    public void setVisibility(int visibility) {
-        this.visibility = visibility;
-    }
-
     public double getWindSpeed() {
         return windSpeed;
     }
 
-    public void setWindSpeed(double windSpeed) {
-        this.windSpeed = windSpeed;
-    }
-
     public int getWindDeg() {
         return windDeg;
     }
 
-    public void setWindDeg(int windDeg) {
-        this.windDeg = windDeg;
-    }
-
     public double getWindGust() {
         return windGust;
     }
 
-    public void setWindGust(double windGust) {
-        this.windGust = windGust;
-    }
-
     public List<Weather> getWeather() {
         return weather;
     }
 
-    public void setWeather(List<Weather> weather) {
-        this.weather = weather;
-    }
-
     public double getPop() {
         return pop;
     }
 
-    public void setPop(double pop) {
-        this.pop = pop;
-    }
-
     public Precipitation getRain() {
         return rain;
     }
 
-    public void setRain(Precipitation rain) {
-        this.rain = rain;
-    }
-
     public Precipitation getSnow() {
         return snow;
     }
-
-    public void setSnow(Precipitation snow) {
-        this.snow = snow;
-    }
 }
index ceceff34678452c8cd151566353240a2d65f399a..2d1fb4e8578547b36c1afcf93da5f373360511f4 100644 (file)
 package org.openhab.binding.openweathermap.internal.dto.onecall;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the data from the <code>minutely</code> object of the JSON response of the One Call APIs.
  *
  * @author Wolfgang Klimt - Initial contribution
  */
@@ -30,15 +25,7 @@ public class Minutely {
         return dt;
     }
 
-    public void setDt(int dt) {
-        this.dt = dt;
-    }
-
     public double getPrecipitation() {
         return precipitation;
     }
-
-    public void setPrecipitation(double precipitation) {
-        this.precipitation = precipitation;
-    }
 }
index 08b1aa10c07ab858b6e89cab4586e63daa79f630..ce3ae10bd38a50ad1361c1f0682392071fd95c44 100644 (file)
@@ -15,12 +15,7 @@ package org.openhab.binding.openweathermap.internal.dto.onecall;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the data from the <code>rain</code> and <code>snow</code> object of the JSON response of the One Call APIs.
  *
  * @author Wolfgang Klimt - Initial contribution
  */
@@ -31,8 +26,4 @@ public class Precipitation {
     public double get1h() {
         return oneHour;
     }
-
-    public void set1h(double oneHour) {
-        this.oneHour = oneHour;
-    }
 }
index b9a7afdd20e84e4dd0739a80997ec5d17af9753a..64847db1d8f7aff8abab41fc6f17fe011f93e38c 100644 (file)
 package org.openhab.binding.openweathermap.internal.dto.onecall;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the data from the <code>weather</code> object of the JSON response of the One Call APIs.
  *
  * @author Wolfgang Klimt - Initial contribution
  */
@@ -32,31 +27,15 @@ public class Weather {
         return id;
     }
 
-    public void setId(int id) {
-        this.id = id;
-    }
-
     public String getMain() {
         return main;
     }
 
-    public void setMain(String main) {
-        this.main = main;
-    }
-
     public String getDescription() {
         return description;
     }
 
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
     public String getIcon() {
         return icon;
     }
-
-    public void setIcon(String icon) {
-        this.icon = icon;
-    }
 }
index 4091ae8908f112323e3910a6653507090971e03f..f6c4e374983216ce1f2d25da269ef0ff3e474897 100644 (file)
@@ -20,12 +20,7 @@ import org.openhab.binding.openweathermap.internal.dto.onecall.Weather;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Holds the data from the deserialised JSON response. Created using http://www.jsonschema2pojo.org/.
- * Settings:
- * Annotation Style: GSON
- * Use primitive types
- * Use double numbers
- * allow additional properties
+ * Holds the data from the JSON response of the One Call History APIs.
  *
  * @author Wolfgang Klimt - Initial contribution
  */
@@ -54,111 +49,55 @@ public class Hourly {
         return dt;
     }
 
-    public void setDt(int dt) {
-        this.dt = dt;
-    }
-
     public double getTemp() {
         return temp;
     }
 
-    public void setTemp(double temp) {
-        this.temp = temp;
-    }
-
     public double getFeelsLike() {
         return feelsLike;
     }
 
-    public void setFeelsLike(double feelsLike) {
-        this.feelsLike = feelsLike;
-    }
-
     public int getPressure() {
         return pressure;
     }
 
-    public void setPressure(int pressure) {
-        this.pressure = pressure;
-    }
-
     public int getHumidity() {
         return humidity;
     }
 
-    public void setHumidity(int humidity) {
-        this.humidity = humidity;
-    }
-
     public double getDewPoint() {
         return dewPoint;
     }
 
-    public void setDewPoint(double dewPoint) {
-        this.dewPoint = dewPoint;
-    }
-
     public int getClouds() {
         return clouds;
     }
 
-    public void setClouds(int clouds) {
-        this.clouds = clouds;
-    }
-
     public int getVisibility() {
         return visibility;
     }
 
-    public void setVisibility(int visibility) {
-        this.visibility = visibility;
-    }
-
     public double getWindSpeed() {
         return windSpeed;
     }
 
-    public void setWindSpeed(double windSpeed) {
-        this.windSpeed = windSpeed;
-    }
-
     public int getWindDeg() {
         return windDeg;
     }
 
-    public void setWindDeg(int windDeg) {
-        this.windDeg = windDeg;
-    }
-
     public double getWindGust() {
         return windGust;
     }
 
-    public void setWindGust(double windGust) {
-        this.windGust = windGust;
-    }
-
     public List<Weather> getWeather() {
         return weather;
     }
 
-    public void setWeather(List<Weather> weather) {
-        this.weather = weather;
-    }
-
     public Precipitation getRain() {
         return rain;
     }
 
-    public void setRain(Precipitation rain) {
-        this.rain = rain;
-    }
-
     public Precipitation getSnow() {
         return snow;
     }
-
-    public void setSnow(Precipitation snow) {
-        this.snow = snow;
-    }
 }
index 94d9fcde0eb05419f16622b3de6c5ba379c65767..2223179f65ffceb4e54c5466447d47565b521517 100644 (file)
@@ -17,7 +17,7 @@ import org.eclipse.jdt.annotation.Nullable;
 import com.google.gson.annotations.SerializedName;
 
 /**
- * Generated Plain Old Java Objects class for {@link Main} from JSON.
+ * Holds the data from the <code>main</code> object of the JSON response of the Current weather data API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
@@ -36,47 +36,23 @@ public class Main {
         return temp;
     }
 
-    public void setTemp(Double temp) {
-        this.temp = temp;
-    }
-
     public @Nullable Double getFeelsLikeTemp() {
         return feelsLikeTemp;
     }
 
-    public void setFeelsLikeTemp(Double feelsLikeTemp) {
-        this.feelsLikeTemp = feelsLikeTemp;
-    }
-
     public Double getPressure() {
         return pressure;
     }
 
-    public void setPressure(Double pressure) {
-        this.pressure = pressure;
-    }
-
     public Integer getHumidity() {
         return humidity;
     }
 
-    public void setHumidity(Integer humidity) {
-        this.humidity = humidity;
-    }
-
     public Double getTempMin() {
         return tempMin;
     }
 
-    public void setTempMin(Double tempMin) {
-        this.tempMin = tempMin;
-    }
-
     public Double getTempMax() {
         return tempMax;
     }
-
-    public void setTempMax(Double tempMax) {
-        this.tempMax = tempMax;
-    }
 }
index 011db4af214a0f8e6fbfb3f599f40773f636d3fd..65fab415fcfdb2dd41c77fd2d0c351a0ae259083 100644 (file)
@@ -13,7 +13,7 @@
 package org.openhab.binding.openweathermap.internal.dto.weather;
 
 /**
- * Generated Plain Old Java Objects class for {@link Sys} from JSON.
+ * Holds the data from the <code>sys</code> object of the JSON response of the Current weather data API.
  *
  * @author Christoph Weitkamp - Initial contribution
  */
@@ -29,47 +29,23 @@ public class Sys {
         return type;
     }
 
-    public void setType(Integer type) {
-        this.type = type;
-    }
-
     public Integer getId() {
         return id;
     }
 
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
     public Double getMessage() {
         return message;
     }
 
-    public void setMessage(Double message) {
-        this.message = message;
-    }
-
     public String getCountry() {
         return country;
     }
 
-    public void setCountry(String country) {
-        this.country = country;
-    }
-
     public Integer getSunrise() {
         return sunrise;
     }
 
-    public void setSunrise(Integer sunrise) {
-        this.sunrise = sunrise;
-    }
-
     public Integer getSunset() {
         return sunset;
     }
-
-    public void setSunset(Integer sunset) {
-        this.sunset = sunset;
-    }
 }
index 31f74cd341bbfe65bec225195394d4bd94e8f716..44857d1651f92a740befb08c12ea7142b2c61c1f 100644 (file)
@@ -30,7 +30,6 @@ import org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAPIHand
 import org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAirPollutionHandler;
 import org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapOneCallHandler;
 import org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapOneCallHistoryHandler;
-import org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapUVIndexHandler;
 import org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapWeatherAndForecastHandler;
 import org.openhab.core.config.discovery.DiscoveryService;
 import org.openhab.core.i18n.LocaleProvider;
@@ -100,8 +99,6 @@ public class OpenWeatherMapHandlerFactory extends BaseThingHandlerFactory {
             return handler;
         } else if (THING_TYPE_WEATHER_AND_FORECAST.equals(thingTypeUID)) {
             return new OpenWeatherMapWeatherAndForecastHandler(thing, timeZoneProvider);
-        } else if (THING_TYPE_UVINDEX.equals(thingTypeUID)) {
-            return new OpenWeatherMapUVIndexHandler(thing, timeZoneProvider);
         } else if (THING_TYPE_AIR_POLLUTION.equals(thingTypeUID)) {
             return new OpenWeatherMapAirPollutionHandler(thing, timeZoneProvider);
         } else if (THING_TYPE_ONECALL_WEATHER_AND_FORECAST.equals(thingTypeUID)) {
index eca9ca7e76a5008dfb34f0a3b93cfe1cebd0d691..846ca2554b6f278c216ae331822b5e18b09c3a15 100644 (file)
@@ -67,8 +67,7 @@ public abstract class AbstractOpenWeatherMapHandler extends BaseThingHandler {
     private final Logger logger = LoggerFactory.getLogger(AbstractOpenWeatherMapHandler.class);
 
     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Set.of(THING_TYPE_WEATHER_AND_FORECAST,
-            THING_TYPE_UVINDEX, THING_TYPE_AIR_POLLUTION, THING_TYPE_ONECALL_WEATHER_AND_FORECAST,
-            THING_TYPE_ONECALL_HISTORY);
+            THING_TYPE_AIR_POLLUTION, THING_TYPE_ONECALL_WEATHER_AND_FORECAST, THING_TYPE_ONECALL_HISTORY);
 
     private final TimeZoneProvider timeZoneProvider;
 
index b86e4ebee2c85186fb7afb7b1c82c0a7b27169d9..80bf8c5dd8c50e360d5104df24b2b5da47ef8e6d 100644 (file)
@@ -809,19 +809,19 @@ public class OpenWeatherMapOneCallHandler extends AbstractOpenWeatherMapHandler
             Alert alert = alerts.get(count);
             switch (channelId) {
                 case CHANNEL_ALERT_EVENT:
-                    state = getStringTypeState(alert.event);
+                    state = getStringTypeState(alert.getEvent());
                     break;
                 case CHANNEL_ALERT_DESCRIPTION:
-                    state = getStringTypeState(alert.description);
+                    state = getStringTypeState(alert.getDescription());
                     break;
                 case CHANNEL_ALERT_ONSET:
-                    state = getDateTimeTypeState(alert.start);
+                    state = getDateTimeTypeState(alert.getStart());
                     break;
                 case CHANNEL_ALERT_EXPIRES:
-                    state = getDateTimeTypeState(alert.end);
+                    state = getDateTimeTypeState(alert.getEnd());
                     break;
                 case CHANNEL_ALERT_SOURCE:
-                    state = getStringTypeState(alert.senderName);
+                    state = getStringTypeState(alert.getSenderName());
                     break;
             }
             logger.debug("Update channel '{}' of group '{}' with new state '{}'.", channelId, channelGroupId, state);
diff --git a/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapUVIndexHandler.java b/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapUVIndexHandler.java
deleted file mode 100644 (file)
index 4f24a4e..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.openweathermap.internal.handler;
-
-import static org.openhab.binding.openweathermap.internal.OpenWeatherMapBindingConstants.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.openhab.binding.openweathermap.internal.config.OpenWeatherMapUVIndexConfiguration;
-import org.openhab.binding.openweathermap.internal.connection.OpenWeatherMapConnection;
-import org.openhab.binding.openweathermap.internal.dto.OpenWeatherMapJsonUVIndexData;
-import org.openhab.core.i18n.CommunicationException;
-import org.openhab.core.i18n.ConfigurationException;
-import org.openhab.core.i18n.TimeZoneProvider;
-import org.openhab.core.thing.Channel;
-import org.openhab.core.thing.ChannelUID;
-import org.openhab.core.thing.Thing;
-import org.openhab.core.thing.ThingStatus;
-import org.openhab.core.thing.ThingStatusDetail;
-import org.openhab.core.thing.binding.builder.ThingBuilder;
-import org.openhab.core.types.State;
-import org.openhab.core.types.UnDefType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.gson.JsonSyntaxException;
-
-/**
- * The {@link OpenWeatherMapUVIndexHandler} is responsible for handling commands, which are sent to one of the
- * channels.
- *
- * @author Christoph Weitkamp - Initial contribution
- */
-@NonNullByDefault
-public class OpenWeatherMapUVIndexHandler extends AbstractOpenWeatherMapHandler {
-
-    private final Logger logger = LoggerFactory.getLogger(OpenWeatherMapUVIndexHandler.class);
-
-    private static final String CHANNEL_GROUP_FORECAST_PREFIX = "forecastDay";
-    private static final Pattern CHANNEL_GROUP_FORECAST_PREFIX_PATTERN = Pattern
-            .compile(CHANNEL_GROUP_FORECAST_PREFIX + "([0-9]*)");
-
-    // keeps track of the parsed count
-    private int forecastDays = 6;
-
-    private @Nullable OpenWeatherMapJsonUVIndexData uvindexData;
-    private @Nullable List<OpenWeatherMapJsonUVIndexData> uvindexForecastData;
-
-    public OpenWeatherMapUVIndexHandler(Thing thing, final TimeZoneProvider timeZoneProvider) {
-        super(thing, timeZoneProvider);
-    }
-
-    @Override
-    public void initialize() {
-        super.initialize();
-        logger.debug("Initialize OpenWeatherMapUVIndexHandler handler '{}'.", getThing().getUID());
-        OpenWeatherMapUVIndexConfiguration config = getConfigAs(OpenWeatherMapUVIndexConfiguration.class);
-
-        boolean configValid = true;
-        int newForecastDays = config.forecastDays;
-        if (newForecastDays < 1 || newForecastDays > 8) {
-            updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
-                    "@text/offline.conf-error-not-supported-uvindex-number-of-days");
-            configValid = false;
-        }
-
-        if (configValid) {
-            logger.debug("Rebuilding thing '{}'.", getThing().getUID());
-            List<Channel> toBeAddedChannels = new ArrayList<>();
-            List<Channel> toBeRemovedChannels = new ArrayList<>();
-            if (forecastDays != newForecastDays) {
-                logger.debug("Rebuilding UV index channel groups.");
-                if (forecastDays > newForecastDays) {
-                    if (newForecastDays < 2) {
-                        toBeRemovedChannels.addAll(removeChannelsOfGroup(CHANNEL_GROUP_FORECAST_TOMORROW));
-                    }
-                    for (int i = newForecastDays; i < forecastDays; ++i) {
-                        toBeRemovedChannels
-                                .addAll(removeChannelsOfGroup(CHANNEL_GROUP_FORECAST_PREFIX + Integer.toString(i)));
-                    }
-                } else {
-                    if (forecastDays <= 1 && newForecastDays > 1) {
-                        toBeAddedChannels.addAll(createChannelsForGroup(CHANNEL_GROUP_FORECAST_TOMORROW,
-                                CHANNEL_GROUP_TYPE_UVINDEX_FORECAST));
-                    }
-                    for (int i = (forecastDays < 2) ? 2 : forecastDays; i < newForecastDays; ++i) {
-                        toBeAddedChannels
-                                .addAll(createChannelsForGroup(CHANNEL_GROUP_FORECAST_PREFIX + Integer.toString(i),
-                                        CHANNEL_GROUP_TYPE_UVINDEX_FORECAST));
-                    }
-                }
-                forecastDays = newForecastDays;
-            }
-            ThingBuilder builder = editThing().withoutChannels(toBeRemovedChannels);
-            for (Channel channel : toBeAddedChannels) {
-                builder.withChannel(channel);
-            }
-            updateThing(builder.build());
-        }
-    }
-
-    @Override
-    protected boolean requestData(OpenWeatherMapConnection connection)
-            throws CommunicationException, ConfigurationException {
-        logger.debug("Update UV Index data of thing '{}'.", getThing().getUID());
-        try {
-            uvindexData = connection.getUVIndexData(location);
-            if (forecastDays > 0) {
-                uvindexForecastData = connection.getUVIndexForecastData(location, forecastDays);
-            }
-            return true;
-        } catch (JsonSyntaxException e) {
-            logger.debug("JsonSyntaxException occurred during execution: {}", e.getMessage(), e);
-            return false;
-        }
-    }
-
-    @Override
-    protected void updateChannel(ChannelUID channelUID) {
-        switch (channelUID.getGroupId()) {
-            case CHANNEL_GROUP_CURRENT_UVINDEX:
-                updateUVIndexChannel(channelUID);
-                break;
-            case CHANNEL_GROUP_FORECAST_TOMORROW:
-                updateUVIndexForecastChannel(channelUID, 1);
-                break;
-            default:
-                Matcher m = CHANNEL_GROUP_FORECAST_PREFIX_PATTERN.matcher(channelUID.getGroupId());
-                int i;
-                if (m.find() && (i = Integer.parseInt(m.group(1))) > 1 && i <= 8) {
-                    updateUVIndexForecastChannel(channelUID, i);
-                }
-                break;
-        }
-    }
-
-    /**
-     * Update the channel from the last OpenWeatherMap data retrieved.
-     *
-     * @param channelUID the id identifying the channel to be updated
-     */
-    private void updateUVIndexChannel(ChannelUID channelUID) {
-        String channelId = channelUID.getIdWithoutGroup();
-        String channelGroupId = channelUID.getGroupId();
-        OpenWeatherMapJsonUVIndexData localUVIndexData = uvindexData;
-        if (localUVIndexData != null) {
-            State state = UnDefType.UNDEF;
-            switch (channelId) {
-                case CHANNEL_TIME_STAMP:
-                    state = getDateTimeTypeState(localUVIndexData.getDate());
-                    break;
-                case CHANNEL_UVINDEX:
-                    state = getDecimalTypeState(localUVIndexData.getValue());
-                    break;
-            }
-            logger.debug("Update channel '{}' of group '{}' with new state '{}'.", channelId, channelGroupId, state);
-            updateState(channelUID, state);
-        } else {
-            logger.debug("No UV Index data available to update channel '{}' of group '{}'.", channelId, channelGroupId);
-        }
-    }
-
-    /**
-     * Update the channel from the last OpenWeatherMap data retrieved.
-     *
-     * @param channelUID the id identifying the channel to be updated
-     * @param count
-     */
-    private void updateUVIndexForecastChannel(ChannelUID channelUID, int count) {
-        String channelId = channelUID.getIdWithoutGroup();
-        String channelGroupId = channelUID.getGroupId();
-        List<OpenWeatherMapJsonUVIndexData> localUVIndexForecastData = uvindexForecastData;
-        if (localUVIndexForecastData != null && localUVIndexForecastData.size() >= count) {
-            OpenWeatherMapJsonUVIndexData forecastData = localUVIndexForecastData.get(count - 1);
-            State state = UnDefType.UNDEF;
-            switch (channelId) {
-                case CHANNEL_TIME_STAMP:
-                    state = getDateTimeTypeState(forecastData.getDate());
-                    break;
-                case CHANNEL_UVINDEX:
-                    state = getDecimalTypeState(forecastData.getValue());
-                    break;
-            }
-            logger.debug("Update channel '{}' of group '{}' with new state '{}'.", channelId, channelGroupId, state);
-            updateState(channelUID, state);
-        } else {
-            logger.debug("No UV Index data available to update channel '{}' of group '{}'.", channelId, channelGroupId);
-        }
-    }
-}
index 8bc59e69b3a798dce16a010ec7546766b955001c..9ed91981c8595b0113ff9f22853d3af046f0b0c6 100644 (file)
@@ -27,18 +27,6 @@ thing-type.openweathermap.onecall.group.forecastToday.label = One Call API Today
 thing-type.openweathermap.onecall.group.forecastToday.description = This is the weather forecast for today from the one call API.
 thing-type.openweathermap.onecall.group.forecastTomorrow.label = One Call API Tomorrows Forecast
 thing-type.openweathermap.onecall.group.forecastTomorrow.description = This is the weather forecast for tomorrow from the one call API.
-thing-type.openweathermap.uvindex.label = UV Index
-thing-type.openweathermap.uvindex.description = Provides UV Index data from the OpenWeatherMap API.
-thing-type.openweathermap.uvindex.group.forecastDay2.label = 2 Day Forecast
-thing-type.openweathermap.uvindex.group.forecastDay2.description = This is the UV Index forecast in two days.
-thing-type.openweathermap.uvindex.group.forecastDay3.label = 3 Day Forecast
-thing-type.openweathermap.uvindex.group.forecastDay3.description = This is the UV Index forecast in three days.
-thing-type.openweathermap.uvindex.group.forecastDay4.label = 4 Day Forecast
-thing-type.openweathermap.uvindex.group.forecastDay4.description = This is the UV Index forecast in four days.
-thing-type.openweathermap.uvindex.group.forecastDay5.label = 5 Day Forecast
-thing-type.openweathermap.uvindex.group.forecastDay5.description = This is the UV Index forecast in five days.
-thing-type.openweathermap.uvindex.group.forecastTomorrow.label = Tomorrows Forecast
-thing-type.openweathermap.uvindex.group.forecastTomorrow.description = This is the UV Index forecast for tomorrow.
 thing-type.openweathermap.weather-and-forecast.label = Weather and Forecast
 thing-type.openweathermap.weather-and-forecast.description = Provides current weather and forecast data from the OpenWeatherMap API.
 thing-type.openweathermap.weather-and-forecast.group.forecastDay2.label = 2 Day Forecast
@@ -146,10 +134,6 @@ thing-type.config.openweathermap.onecall.location.label = Location of Weather
 thing-type.config.openweathermap.onecall.location.description = Location of weather in geographical coordinates (latitude/longitude/altitude).
 thing-type.config.openweathermap.onecall.numberOfAlerts.label = Number of Alerts
 thing-type.config.openweathermap.onecall.numberOfAlerts.description = Number of alerts to be shown.
-thing-type.config.openweathermap.uvindex.forecastDays.label = Number of Days
-thing-type.config.openweathermap.uvindex.forecastDays.description = Number of days for UV Index forecast.
-thing-type.config.openweathermap.uvindex.location.label = Location of Weather
-thing-type.config.openweathermap.uvindex.location.description = Location of weather in geographical coordinates (latitude/longitude/altitude).
 thing-type.config.openweathermap.weather-and-forecast.forecastDays.label = Number of Days
 thing-type.config.openweathermap.weather-and-forecast.forecastDays.description = Number of days for daily forecast.
 thing-type.config.openweathermap.weather-and-forecast.forecastHours.label = Number of Hours
@@ -190,10 +174,6 @@ channel-group-type.openweathermap.oneCallMinutelyTimeSeries.description = Minute
 channel-group-type.openweathermap.station.label = Weather Station
 channel-group-type.openweathermap.station.description = This is a weather station.
 channel-group-type.openweathermap.station.channel.location.description = Location of the weather station or the city.
-channel-group-type.openweathermap.uvindex.label = Current UV Index
-channel-group-type.openweathermap.uvindex.description = This is the current UV Index.
-channel-group-type.openweathermap.uvindexForecast.label = Forecasted UV Index
-channel-group-type.openweathermap.uvindexForecast.description = This is the forecasted UV Index.
 channel-group-type.openweathermap.weather.label = Current Weather
 channel-group-type.openweathermap.weather.description = This is the current weather.
 
index 8b353c1524550a83e3212e85bcee542d6cd56cf3..67573a833d2da4ad5dc83155732b6a8f047dd099 100644 (file)
                </channels>
        </channel-group-type>
 
-       <channel-group-type id="uvindex">
-               <label>Current UV Index</label>
-               <description>This is the current UV Index.</description>
-               <channels>
-                       <channel id="time-stamp" typeId="daily-forecast-time-stamp"/>
-                       <channel id="uvindex" typeId="uvindex"/>
-               </channels>
-       </channel-group-type>
-
-       <channel-group-type id="uvindexForecast">
-               <label>Forecasted UV Index</label>
-               <description>This is the forecasted UV Index.</description>
-               <channels>
-                       <channel id="time-stamp" typeId="daily-forecast-time-stamp"/>
-                       <channel id="uvindex" typeId="forecasted-uvindex"/>
-               </channels>
-       </channel-group-type>
-
        <channel-group-type id="airPollution">
                <label>Current Air Pollution</label>
                <description>This is the current air pollution.</description>
index bc9a2aad61b89f06770bda5e0f272ccff47bd965..041c2694644f88157ceb54c5605840c6a1b0a6ea 100644 (file)
                <config-description-ref uri="thing-type:openweathermap:weather-and-forecast"/>
        </thing-type>
 
-       <thing-type id="uvindex">
-               <supported-bridge-type-refs>
-                       <bridge-type-ref id="weather-api"/>
-               </supported-bridge-type-refs>
-
-               <label>UV Index</label>
-               <description>Provides UV Index data from the OpenWeatherMap API.</description>
-
-               <channel-groups>
-                       <channel-group id="current" typeId="uvindex"/>
-                       <channel-group id="forecastTomorrow" typeId="uvindexForecast">
-                               <label>Tomorrows Forecast</label>
-                               <description>This is the UV Index forecast for tomorrow.</description>
-                       </channel-group>
-                       <channel-group id="forecastDay2" typeId="uvindexForecast">
-                               <label>2 Day Forecast</label>
-                               <description>This is the UV Index forecast in two days.</description>
-                       </channel-group>
-                       <channel-group id="forecastDay3" typeId="uvindexForecast">
-                               <label>3 Day Forecast</label>
-                               <description>This is the UV Index forecast in three days.</description>
-                       </channel-group>
-                       <channel-group id="forecastDay4" typeId="uvindexForecast">
-                               <label>4 Day Forecast</label>
-                               <description>This is the UV Index forecast in four days.</description>
-                       </channel-group>
-                       <channel-group id="forecastDay5" typeId="uvindexForecast">
-                               <label>5 Day Forecast</label>
-                               <description>This is the UV Index forecast in five days.</description>
-                       </channel-group>
-               </channel-groups>
-
-               <representation-property>location</representation-property>
-
-               <config-description-ref uri="thing-type:openweathermap:uvindex"/>
-       </thing-type>
-
        <thing-type id="air-pollution">
                <supported-bridge-type-refs>
                        <bridge-type-ref id="weather-api"/>