]> git.basschouten.com Git - openhab-addons.git/commitdiff
[openweathermap] Fixed UV-Index Channel Group Creation (#9832)
authorChristoph Weitkamp <github@christophweitkamp.de>
Sun, 24 Jan 2021 14:47:15 +0000 (15:47 +0100)
committerGitHub <noreply@github.com>
Sun, 24 Jan 2021 14:47:15 +0000 (15:47 +0100)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
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/handler/OpenWeatherMapUVIndexHandler.java

index 260faa86994aad2b33cfb63de85a9811b828237a..ea3c6afad960bc2a3f59a00ce75a8f408fe3b4ae 100644 (file)
@@ -52,7 +52,8 @@ 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 = new ChannelGroupTypeUID(BINDING_ID, "uvindex");
+    public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_UVINDEX_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
+            "uvindexForecast");
     public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ONECALL_MINUTELY_FORECAST = new ChannelGroupTypeUID(
             BINDING_ID, "oneCallMinutely");
     public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ONECALL_HOURLY_FORECAST = new ChannelGroupTypeUID(
index e50ff82b1c9760d51555e29f0f37694cfbe29bf8..141a5896df3e1e30070f91fe95ee4acac3a16668 100644 (file)
@@ -95,12 +95,13 @@ public class OpenWeatherMapUVIndexHandler extends AbstractOpenWeatherMapHandler
                     }
                 } else {
                     if (forecastDays <= 1 && newForecastDays > 1) {
-                        toBeAddedChannels.addAll(
-                                createChannelsForGroup(CHANNEL_GROUP_FORECAST_TOMORROW, CHANNEL_GROUP_TYPE_UVINDEX));
+                        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));
+                        toBeAddedChannels
+                                .addAll(createChannelsForGroup(CHANNEL_GROUP_FORECAST_PREFIX + Integer.toString(i),
+                                        CHANNEL_GROUP_TYPE_UVINDEX_FORECAST));
                     }
                 }
                 forecastDays = newForecastDays;