]> git.basschouten.com Git - openhab-addons.git/commitdiff
[Openuv] Providing an iconserver (#15191)
authorGaël L'hopital <gael@lhopital.org>
Thu, 13 Jul 2023 11:16:56 +0000 (13:16 +0200)
committerGitHub <noreply@github.com>
Thu, 13 Jul 2023 11:16:56 +0000 (13:16 +0200)
* Adding an icon server to OpenUV binding

---------

Signed-off-by: clinique <gael@lhopital.org>
24 files changed:
bundles/org.openhab.binding.openuv/README.md
bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/AlertLevel.java [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/OpenUVException.java
bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/OpenUVIconProvider.java [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/discovery/OpenUVDiscoveryService.java
bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/handler/OpenUVBridgeHandler.java
bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/handler/OpenUVReportHandler.java
bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/json/OpenUVResult.java
bundles/org.openhab.binding.openuv/src/main/resources/OH-INF/i18n/openuv.properties
bundles/org.openhab.binding.openuv/src/main/resources/OH-INF/thing/thing-types.xml
bundles/org.openhab.binding.openuv/src/main/resources/icon/ozone.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-alarm.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-1.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-10.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-11.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-2.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-3.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-4.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-5.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-6.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-7.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-8.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-9.svg [new file with mode: 0644]
bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index.svg [new file with mode: 0755]

index 90391dfc8f81f7c68ffc262dedd624450726ba5b..22aeb8c28ffd1fe850266030d234d3084d81b51d 100644 (file)
@@ -62,6 +62,16 @@ This is quite useful with a free OpenUV account (50 req/day included): in this c
 
 Thing can be extended with as many SafeExposure channels as needed for each skin type.
 
+## Provided icon set
+
+This binding has its own IconProvider and makes available the following list of icons
+
+| Icon Name          | Dynamic | Illustration |
+|--------------------|---------|--------------|
+| oh:openuv:ozone    |   No    | ![](src/main/resources/icon/ozone.svg) |
+| oh:openuv:uv-alarm |   Yes   | ![](src/main/resources/icon/uv-alarm.svg) |
+| oh:openuv:uv-index |   Yes   | ![](src/main/resources/icon/uv-index.svg) |
+
 ## Examples
 
 demo.things:
diff --git a/bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/AlertLevel.java b/bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/AlertLevel.java
new file mode 100644 (file)
index 0000000..1d32407
--- /dev/null
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) 2010-2023 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.openuv.internal;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.openhab.core.library.types.DecimalType;
+import org.openhab.core.types.State;
+import org.openhab.core.types.UnDefType;
+
+/**
+ * The {@link AlertLevel} enum defines alert level in regard of the UV Index
+ *
+ * @author Gaël L'hopital - Initial contribution
+ */
+@NonNullByDefault
+public enum AlertLevel {
+    GREEN(DecimalType.ZERO, "3a8b2f"),
+    YELLOW(new DecimalType(1), "f9a825"),
+    ORANGE(new DecimalType(2), "ef6c00"),
+    RED(new DecimalType(3), "b71c1c"),
+    PURPLE(new DecimalType(4), "6a1b9a"),
+    UNKNOWN(UnDefType.NULL, "b3b3b3");
+
+    public final State state;
+    public final String color;
+
+    AlertLevel(State state, String color) {
+        this.state = state;
+        this.color = color;
+    }
+
+    public static AlertLevel fromUVIndex(double uv) {
+        if (uv >= 11) {
+            return PURPLE;
+        } else if (uv >= 8) {
+            return RED;
+        } else if (uv >= 6) {
+            return ORANGE;
+        } else if (uv >= 3) {
+            return YELLOW;
+        } else if (uv > 0) {
+            return GREEN;
+        }
+        return UNKNOWN;
+    }
+}
index ab37e7349f9d792880f2804dba470e56d770f6f3..c95dbfed90bf4f5bd9b8dbe27e01d9e5fd36fcfb 100644 (file)
@@ -29,6 +29,10 @@ public class OpenUVException extends Exception {
         super(message);
     }
 
+    public OpenUVException(String fitzPatrickIndex, Throwable e) {
+        super("Unexpected Fitzpatrick index value '%s'".formatted(fitzPatrickIndex), e);
+    }
+
     private boolean checkMatches(String message) {
         String currentMessage = getMessage();
         return currentMessage != null && currentMessage.startsWith(message);
diff --git a/bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/OpenUVIconProvider.java b/bundles/org.openhab.binding.openuv/src/main/java/org/openhab/binding/openuv/internal/OpenUVIconProvider.java
new file mode 100644 (file)
index 0000000..4083e65
--- /dev/null
@@ -0,0 +1,125 @@
+/**
+ * Copyright (c) 2010-2023 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.openuv.internal;
+
+import static org.openhab.binding.openuv.internal.OpenUVBindingConstants.BINDING_ID;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.util.Locale;
+import java.util.Set;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+import org.openhab.core.i18n.TranslationProvider;
+import org.openhab.core.ui.icon.IconProvider;
+import org.openhab.core.ui.icon.IconSet;
+import org.openhab.core.ui.icon.IconSet.Format;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The {@link OpenUVIconProvider} is the class providing binding related icons.
+ *
+ * @author Gaël L'hopital - Initial contribution
+ */
+@Component(service = { IconProvider.class })
+@NonNullByDefault
+public class OpenUVIconProvider implements IconProvider {
+    private static final String UV_ALARM = "uv-alarm";
+    private static final String UV_INDEX = "uv-index";
+    private static final String DEFAULT_LABEL = "OpenUV Icons";
+    private static final String DEFAULT_DESCRIPTION = "Icons illustrating UV conditions provided by OpenUV";
+    private static final Set<String> ICONS = Set.of("ozone", UV_INDEX, UV_ALARM);
+
+    private final Logger logger = LoggerFactory.getLogger(OpenUVIconProvider.class);
+    private final BundleContext context;
+    private final TranslationProvider i18nProvider;
+
+    @Activate
+    public OpenUVIconProvider(final BundleContext context, final @Reference TranslationProvider i18nProvider) {
+        this.context = context;
+        this.i18nProvider = i18nProvider;
+    }
+
+    @Override
+    public Set<IconSet> getIconSets() {
+        return getIconSets(null);
+    }
+
+    @Override
+    public Set<IconSet> getIconSets(@Nullable Locale locale) {
+        String label = getText("label", DEFAULT_LABEL, locale);
+        String description = getText("decription", DEFAULT_DESCRIPTION, locale);
+
+        return Set.of(new IconSet(BINDING_ID, label, description, Set.of(Format.SVG)));
+    }
+
+    private String getText(String entry, String defaultValue, @Nullable Locale locale) {
+        String text = defaultValue;
+        if (locale != null) {
+            text = i18nProvider.getText(context.getBundle(), "iconset." + entry, defaultValue, locale);
+            text = text == null ? defaultValue : text;
+        }
+        return text;
+    }
+
+    @Override
+    public @Nullable Integer hasIcon(String category, String iconSetId, Format format) {
+        return ICONS.contains(category) && iconSetId.equals(BINDING_ID) && format == Format.SVG ? 0 : null;
+    }
+
+    @Override
+    public @Nullable InputStream getIcon(String category, String iconSetId, @Nullable String state, Format format) {
+        String iconName = category;
+        if (UV_INDEX.equals(category) && state != null) {
+            try {
+                Double numeric = Double.valueOf(state);
+                iconName = "%s-%d".formatted(category, numeric.intValue());
+            } catch (NumberFormatException e) {
+                logger.debug("Unable to parse {} to a numeric value", state);
+            }
+        }
+        String icon = getResource(iconName);
+        if (UV_ALARM.equals(category) && state != null) {
+            try {
+                Integer ordinal = Integer.valueOf(state);
+                AlertLevel alertLevel = ordinal < AlertLevel.values().length ? AlertLevel.values()[ordinal]
+                        : AlertLevel.UNKNOWN;
+                icon = icon.replaceAll(AlertLevel.UNKNOWN.color, alertLevel.color);
+            } catch (NumberFormatException e) {
+                logger.debug("Unable to parse {} to a numeric value", state);
+            }
+        }
+        return icon.isEmpty() ? null : new ByteArrayInputStream(icon.getBytes());
+    }
+
+    private String getResource(String iconName) {
+        String result = "";
+
+        URL iconResource = context.getBundle().getEntry("icon/%s.svg".formatted(iconName));
+        try (InputStream stream = iconResource.openStream()) {
+            result = new String(stream.readAllBytes(), StandardCharsets.UTF_8);
+        } catch (IOException e) {
+            logger.warn("Unable to load ressource '{}' : {}", iconResource.getPath(), e.getMessage());
+        }
+        return result;
+    }
+}
index a39430361a59c6aaf9bcbb54fc6df5bc6498ec6a..ab46eb4ff54d5590f81d1f01e87afa6f45f33ca2 100644 (file)
@@ -46,11 +46,10 @@ public class OpenUVDiscoveryService extends AbstractDiscoveryService implements
 
     @Override
     public void setThingHandler(ThingHandler handler) {
-        if (handler instanceof OpenUVBridgeHandler) {
-            OpenUVBridgeHandler localHandler = (OpenUVBridgeHandler) handler;
-            bridgeHandler = localHandler;
-            i18nProvider = localHandler.getI18nProvider();
-            localeProvider = localHandler.getLocaleProvider();
+        if (handler instanceof OpenUVBridgeHandler bridgeHandler) {
+            this.bridgeHandler = bridgeHandler;
+            this.i18nProvider = bridgeHandler.getI18nProvider();
+            this.localeProvider = bridgeHandler.getLocaleProvider();
         }
     }
 
index f268d896318f675129e7cde2b658bb60ee469f17..af65fe28c2d9093e4979593fd03a6896eee5f878 100644 (file)
@@ -13,6 +13,7 @@
 package org.openhab.binding.openuv.internal.handler;
 
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.time.Duration;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -58,7 +59,7 @@ import com.google.gson.JsonSyntaxException;
  */
 @NonNullByDefault
 public class OpenUVBridgeHandler extends BaseBridgeHandler {
-    private static final String QUERY_URL = "https://api.openuv.io/api/v1/uv?lat=%s&lng=%s&alt=%s";
+    private static final String QUERY_URL = "https://api.openuv.io/api/v1/uv?lat=%.2f&lng=%.2f&alt=%.0f";
     private static final int RECONNECT_DELAY_MIN = 5;
     private static final int REQUEST_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(30);
 
@@ -97,6 +98,7 @@ public class OpenUVBridgeHandler extends BaseBridgeHandler {
 
     @Override
     public void dispose() {
+        header.clear();
         freeReconnectJob();
     }
 
@@ -104,20 +106,20 @@ public class OpenUVBridgeHandler extends BaseBridgeHandler {
     public void handleCommand(ChannelUID channelUID, Command command) {
         if (command instanceof RefreshType) {
             initiateConnexion();
-            return;
+        } else {
+            logger.debug("The OpenUV bridge only handles Refresh command and not '{}'", command);
         }
-        logger.debug("The OpenUV bridge only handles Refresh command and not '{}'", command);
     }
 
     private void initiateConnexion() {
         // Just checking if the provided api key is a valid one by making a fake call
-        getUVData("0", "0", "0");
+        getUVData(BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO);
     }
 
-    public @Nullable OpenUVResult getUVData(String latitude, String longitude, String altitude) {
+    public @Nullable OpenUVResult getUVData(BigDecimal latitude, BigDecimal longitude, BigDecimal altitude) {
         String statusMessage = "";
         ThingStatusDetail statusDetail = ThingStatusDetail.COMMUNICATION_ERROR;
-        String url = String.format(QUERY_URL, latitude, longitude, altitude);
+        String url = QUERY_URL.formatted(latitude, longitude, altitude);
         String jsonData = "";
         try {
             jsonData = HttpUtil.executeUrl("GET", url, header, null, null, REQUEST_TIMEOUT_MS);
@@ -133,28 +135,25 @@ public class OpenUVBridgeHandler extends BaseBridgeHandler {
             }
         } catch (JsonSyntaxException e) {
             if (jsonData.contains("MongoError")) {
-                statusMessage = String.format("@text/offline.comm-error-faultly-service [ \"%d\" ]",
-                        RECONNECT_DELAY_MIN);
+                statusMessage = "@text/offline.comm-error-faultly-service [ \"%d\" ]".formatted(RECONNECT_DELAY_MIN);
                 scheduleReconnectJob(RECONNECT_DELAY_MIN);
             } else {
                 statusDetail = ThingStatusDetail.NONE;
-                statusMessage = String.format("@text/offline.invalid-json [ \"%s\" ]", url);
+                statusMessage = "@text/offline.invalid-json [ \"%s\" ]".formatted(url);
                 logger.debug("{} : {}", statusMessage, jsonData);
             }
         } catch (IOException e) {
-            statusMessage = String.format("@text/offline.comm-error-ioexception [ \"%s\",\"%d\" ]", e.getMessage(),
+            statusMessage = "@text/offline.comm-error-ioexception [ \"%s\",\"%d\" ]".formatted(e.getMessage(),
                     RECONNECT_DELAY_MIN);
             scheduleReconnectJob(RECONNECT_DELAY_MIN);
         } catch (OpenUVException e) {
             if (e.isQuotaError()) {
                 LocalDateTime nextMidnight = LocalDate.now().plusDays(1).atStartOfDay().plusMinutes(2);
-                statusMessage = String.format("@text/offline.comm-error-quota-exceeded [ \"%s\" ]",
-                        nextMidnight.toString());
+                statusMessage = "@text/offline.comm-error-quota-exceeded [ \"%s\" ]".formatted(nextMidnight.toString());
                 scheduleReconnectJob(Duration.between(LocalDateTime.now(), nextMidnight).toMinutes());
             } else if (e.isApiKeyError()) {
                 if (keyVerified) {
-                    statusMessage = String.format("@text/offline.api-key-not-recognized [ \"%d\" ]",
-                            RECONNECT_DELAY_MIN);
+                    statusMessage = "@text/offline.api-key-not-recognized [ \"%d\" ]".formatted(RECONNECT_DELAY_MIN);
                     scheduleReconnectJob(RECONNECT_DELAY_MIN);
                 } else {
                     statusDetail = ThingStatusDetail.CONFIGURATION_ERROR;
index a0aaac8be5436732edf02b241f8e1f734d34a948..826111e48b0e0696fa45c23040731483f49e19e8 100644 (file)
@@ -17,12 +17,13 @@ import static org.openhab.binding.openuv.internal.OpenUVBindingConstants.*;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
 import java.time.temporal.ChronoUnit;
-import java.util.Map;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
 
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
+import org.openhab.binding.openuv.internal.AlertLevel;
+import org.openhab.binding.openuv.internal.OpenUVException;
 import org.openhab.binding.openuv.internal.config.ReportConfiguration;
 import org.openhab.binding.openuv.internal.config.SafeExposureConfiguration;
 import org.openhab.binding.openuv.internal.json.OpenUVResult;
@@ -56,16 +57,6 @@ import org.slf4j.LoggerFactory;
  */
 @NonNullByDefault
 public class OpenUVReportHandler extends BaseThingHandler {
-    private static final State ALERT_GREEN = DecimalType.ZERO;
-    private static final State ALERT_YELLOW = new DecimalType(1);
-    private static final State ALERT_ORANGE = new DecimalType(2);
-    private static final State ALERT_RED = new DecimalType(3);
-    private static final State ALERT_PURPLE = new DecimalType(4);
-    private static final State ALERT_UNDEF = HSBType.fromRGB(179, 179, 179);
-
-    private static final Map<State, State> ALERT_COLORS = Map.of(ALERT_GREEN, HSBType.fromRGB(85, 139, 47),
-            ALERT_YELLOW, HSBType.fromRGB(249, 168, 37), ALERT_ORANGE, HSBType.fromRGB(239, 108, 0), ALERT_RED,
-            HSBType.fromRGB(183, 28, 28), ALERT_PURPLE, HSBType.fromRGB(106, 27, 154));
 
     private final Logger logger = LoggerFactory.getLogger(OpenUVReportHandler.class);
 
@@ -108,9 +99,9 @@ public class OpenUVReportHandler extends BaseThingHandler {
         ScheduledFuture<?> job = this.uvMaxJob;
         if ((job == null || job.isCancelled())) {
             State uvMaxTime = openUVData.getUVMaxTime();
-            if (uvMaxTime != UnDefType.NULL) {
-                ZonedDateTime uvMaxZdt = ((DateTimeType) uvMaxTime).getZonedDateTime();
-                long timeDiff = ChronoUnit.MINUTES.between(ZonedDateTime.now(ZoneId.systemDefault()), uvMaxZdt);
+            if (uvMaxTime instanceof DateTimeType uvMaxDateTime) {
+                long timeDiff = ChronoUnit.MINUTES.between(ZonedDateTime.now(ZoneId.systemDefault()),
+                        uvMaxDateTime.getZonedDateTime());
                 if (timeDiff > 0) {
                     logger.debug("Scheduling {} in {} minutes", UV_MAX_EVENT, timeDiff);
                     uvMaxJob = scheduler.schedule(() -> {
@@ -131,18 +122,17 @@ public class OpenUVReportHandler extends BaseThingHandler {
             ReportConfiguration config = getConfigAs(ReportConfiguration.class);
             refreshJob = scheduler.scheduleWithFixedDelay(() -> {
                 if (!suspendUpdates) {
-                    updateChannels(config);
+                    updateChannels(new PointType(config.location));
                 }
             }, 0, config.refresh, TimeUnit.MINUTES);
         }
     }
 
-    private void updateChannels(ReportConfiguration config) {
+    private void updateChannels(PointType location) {
         ThingStatusInfo bridgeStatusInfo = bridgeHandler.getThing().getStatusInfo();
         if (bridgeStatusInfo.getStatus() == ThingStatus.ONLINE) {
-            PointType location = new PointType(config.location);
-            OpenUVResult openUVData = bridgeHandler.getUVData(location.getLatitude().toString(),
-                    location.getLongitude().toString(), location.getAltitude().toString());
+            OpenUVResult openUVData = bridgeHandler.getUVData(location.getLatitude().toBigDecimal(),
+                    location.getLongitude().toBigDecimal(), location.getAltitude().toBigDecimal());
             if (openUVData != null) {
                 scheduleUVMaxEvent(openUVData);
                 getThing().getChannels().stream().filter(channel -> isLinked(channel.getUID().getId()))
@@ -158,28 +148,28 @@ public class OpenUVReportHandler extends BaseThingHandler {
     @Override
     public void dispose() {
         logger.debug("Disposing the OpenUV handler.");
-        ScheduledFuture<?> refresh = refreshJob;
-        if (refresh != null && !refresh.isCancelled()) {
-            refresh.cancel(true);
-        }
+
+        cancelFuture(refreshJob);
         refreshJob = null;
 
-        ScheduledFuture<?> uxMax = uvMaxJob;
-        if (uxMax != null && !uxMax.isCancelled()) {
-            uxMax.cancel(true);
-        }
+        cancelFuture(uvMaxJob);
         uvMaxJob = null;
     }
 
+    private void cancelFuture(@Nullable ScheduledFuture<?> job) {
+        if (job != null && !job.isCancelled()) {
+            job.cancel(true);
+        }
+    }
+
     @Override
     public void handleCommand(ChannelUID channelUID, Command command) {
         if (command instanceof RefreshType) {
             scheduler.execute(() -> {
                 ReportConfiguration config = getConfigAs(ReportConfiguration.class);
-                updateChannels(config);
+                updateChannels(new PointType(config.location));
             });
-        } else if (ELEVATION.equals(channelUID.getId()) && command instanceof QuantityType) {
-            QuantityType<?> qtty = (QuantityType<?>) command;
+        } else if (ELEVATION.equals(channelUID.getId()) && command instanceof QuantityType<?> qtty) {
             if (Units.DEGREE_ANGLE.equals(qtty.getUnit())) {
                 suspendUpdates = qtty.doubleValue() < 0;
             } else {
@@ -196,9 +186,9 @@ public class OpenUVReportHandler extends BaseThingHandler {
             case UV_INDEX:
                 return new DecimalType(openUVData.getUv());
             case ALERT_LEVEL:
-                return asAlertLevel(openUVData.getUv());
+                return AlertLevel.fromUVIndex(openUVData.getUv()).state;
             case UV_COLOR:
-                return ALERT_COLORS.getOrDefault(asAlertLevel(openUVData.getUv()), ALERT_UNDEF);
+                return hexToHSB(AlertLevel.fromUVIndex(openUVData.getUv()).color);
             case UV_MAX:
                 return new DecimalType(openUVData.getUvMax());
             case OZONE:
@@ -210,26 +200,24 @@ public class OpenUVReportHandler extends BaseThingHandler {
             case UV_TIME:
                 return openUVData.getUVTime();
         }
+
         ChannelTypeUID channelType = channel.getChannelTypeUID();
         if (channelType != null && SAFE_EXPOSURE.equals(channelType.getId())) {
             SafeExposureConfiguration configuration = channel.getConfiguration().as(SafeExposureConfiguration.class);
-            return openUVData.getSafeExposureTime(configuration.index);
+            try {
+                return openUVData.getSafeExposureTime(configuration.index);
+            } catch (OpenUVException e) {
+                logger.warn("Error getting safe exposure value : {}", e.getMessage());
+            }
         }
+
         return UnDefType.NULL;
     }
 
-    private State asAlertLevel(double uv) {
-        if (uv >= 11) {
-            return ALERT_PURPLE;
-        } else if (uv >= 8) {
-            return ALERT_RED;
-        } else if (uv >= 6) {
-            return ALERT_ORANGE;
-        } else if (uv >= 3) {
-            return ALERT_YELLOW;
-        } else if (uv > 0) {
-            return ALERT_GREEN;
-        }
-        return UnDefType.NULL;
+    private State hexToHSB(String hexValue) {
+        int resultRed = Integer.valueOf(hexValue.substring(0, 2), 16);
+        int resultGreen = Integer.valueOf(hexValue.substring(2, 4), 16);
+        int resultBlue = Integer.valueOf(hexValue.substring(4, 6), 16);
+        return HSBType.fromRGB(resultRed, resultGreen, resultBlue);
     }
 }
index 399e23247831b6df4b998aa828b9e5cbc981d95d..70a6cf6d30c153828ce00bc327f720ebcf2ee35b 100644 (file)
 package org.openhab.binding.openuv.internal.json;
 
 import java.time.ZonedDateTime;
-import java.util.HashMap;
 import java.util.Map;
 
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
+import org.openhab.binding.openuv.internal.OpenUVException;
 import org.openhab.core.library.types.DateTimeType;
 import org.openhab.core.library.types.QuantityType;
 import org.openhab.core.library.unit.Units;
 import org.openhab.core.types.State;
 import org.openhab.core.types.UnDefType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.gson.annotations.SerializedName;
 
@@ -35,8 +33,6 @@ import com.google.gson.annotations.SerializedName;
  */
 @NonNullByDefault
 public class OpenUVResult {
-    private final Logger logger = LoggerFactory.getLogger(OpenUVResult.class);
-
     public enum FitzpatrickType {
         @SerializedName("st1")
         I, // Fitzpatrick Skin Type I
@@ -58,7 +54,7 @@ public class OpenUVResult {
     private @Nullable ZonedDateTime uvTime;
     private @Nullable ZonedDateTime uvMaxTime;
     private @Nullable ZonedDateTime ozoneTime;
-    private Map<FitzpatrickType, @Nullable Integer> safeExposureTime = new HashMap<>();
+    private Map<FitzpatrickType, @Nullable Integer> safeExposureTime = Map.of();
 
     public double getUv() {
         return uv;
@@ -88,16 +84,12 @@ public class OpenUVResult {
         return getValueOrNull(ozoneTime);
     }
 
-    public State getSafeExposureTime(String index) {
+    public State getSafeExposureTime(String index) throws OpenUVException {
         try {
-            FitzpatrickType value = FitzpatrickType.valueOf(index);
-            Integer duration = safeExposureTime.get(value);
-            if (duration != null) {
-                return QuantityType.valueOf(duration, Units.MINUTE);
-            }
+            Integer duration = safeExposureTime.get(FitzpatrickType.valueOf(index));
+            return duration != null ? QuantityType.valueOf(duration, Units.MINUTE) : UnDefType.NULL;
         } catch (IllegalArgumentException e) {
-            logger.warn("Unexpected Fitzpatrick index value '{}' : {}", index, e.getMessage());
+            throw new OpenUVException(index, e);
         }
-        return UnDefType.NULL;
     }
 }
index b889bd5f5baf9d196bad8164e75f4e3ec4bf7043..8b9ac8ba1412e891b04fa6f8eb0ea2ccd00ac249 100644 (file)
@@ -74,3 +74,8 @@ offline.api-key-not-recognized = Service error while API key is known correct, w
 # discovery result
 
 discovery.openuv.uvreport.local.label = Local UV Report
+
+# iconprovider
+
+iconset.label = OpenUV Icons
+iconset.description = Icons illustrating UV conditions provided by OpenUV
index 49b43580e4b28defee026a63f6017644f56ec31a..1a0c0bf9600df33df392d2ad6d3ce92e66f5306f 100644 (file)
@@ -74,6 +74,7 @@
                <item-type>Number</item-type>
                <label>UV Index</label>
                <description>UV Index</description>
+               <category>oh:openuv:uv-index</category>
                <state readOnly="true" pattern="%.0f/16" min="0" max="16"/>
        </channel-type>
 
@@ -81,6 +82,7 @@
                <item-type>Number</item-type>
                <label>UV Max</label>
                <description>Max UV Index for the day (at solar noon)</description>
+               <category>oh:openuv:uv-index</category>
                <state readOnly="true" pattern="%.0f/16" min="0" max="16"/>
        </channel-type>
 
@@ -88,6 +90,7 @@
                <item-type>Number:ArealDensity</item-type>
                <label>Ozone</label>
                <description>Ozone level from OMI data</description>
+               <category>oh:openuv:ozone</category>
                <state readOnly="true" pattern="%.1f %unit%"/>
        </channel-type>
 
                <item-type>Number:Time</item-type>
                <label>Safe Exposure</label>
                <description>Safe exposure duration for Fitzpatrick Skin Types.</description>
-               <category>time</category>
+               <category>Time</category>
                <state readOnly="true" pattern="%d %unit%"/>
                <config-description>
                        <parameter name="index" type="text">
        <channel-type id="Alert">
                <item-type>Number</item-type>
                <label>UV Alert</label>
-               <category>alarm</category>
+               <category>oh:openuv:uv-alarm</category>
                <state readOnly="true">
                        <options>
                                <option value="0">Low</option>
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/ozone.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/ozone.svg
new file mode 100644 (file)
index 0000000..fce47e3
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg viewBox="0 0 380.6 380.6" width="380.6" height="380.6" xmlns="http://www.w3.org/2000/svg">
+  <defs>
+    <style type="text/css">
+       .st0{fill:#1A98D5;}
+</style>
+  </defs>
+  <path class="st0" d="M 236.072 302.465 C 239.076 304.128 246.015 306.704 253.334 306.704 C 266.873 306.704 271.062 299.249 270.956 293.659 C 270.829 284.249 261.013 280.211 250.817 280.211 L 244.936 280.211 L 244.936 273.378 L 250.817 273.378 C 258.496 273.378 268.185 269.961 268.185 261.995 C 268.185 256.606 264.229 251.855 254.519 251.855 C 248.278 251.855 242.291 254.23 238.949 256.313 L 236.199 249.681 C 240.261 247.105 248.172 244.51 256.571 244.51 C 271.908 244.51 278.868 252.367 278.868 260.552 C 278.868 267.477 274.066 273.378 264.483 276.393 L 264.483 276.594 C 274.066 278.256 281.851 284.45 281.851 293.878 C 281.851 304.639 272.141 314.067 253.461 314.067 C 244.724 314.067 237.045 311.692 233.216 309.518 L 236.072 302.465 Z" style=""/>
+  <g>
+    <path class="st0" d="M325.8,190.3c0-33.7-12.2-64.6-32.4-88.4c0,2.6,0,5.1,0,7.7c-0.2,0.6-0.5,1.2-0.6,1.9 c-2.2,12.2-8.7,21.5-19.4,27.8c-14.8,8.7-34.5,6.2-46.8-5.8c-0.5-0.4-1.6-0.7-2.2-0.4c-11.9,5.9-23.8,11.8-35.7,17.8 c-9.7,4.9-19.5,9.7-29.2,14.6c-13,6.5-26.1,13-39.1,19.6c-0.6,0.3-1,1.3-1.1,2c-0.1,3.2-0.1,6.4,0,9.7c0,0.7,0.5,1.6,1.1,2 c2.4,1.4,4.9,2.6,7.3,3.8c18.9,9.5,37.9,18.9,56.8,28.4c13.3,6.6,26.6,13.3,39.9,19.9c0.5,0.3,1.6,0.1,2-0.3 c7.6-7.3,16.6-10.9,27.1-11c18.1-0.2,33.9,11.8,38.4,29.4c0.5,1.8,0.9,3.6,1.4,5.4c0,1.5,0,3,0,4.5 C313.6,254.9,325.8,224,325.8,190.3z"/>
+    <path class="st0" d="M228.2,308.6c-10.4-9.2-14.8-20.9-13.4-34.6c0.1-1.1-0.1-1.7-1.2-2.2c-11.4-5.6-22.7-11.4-34.1-17 c-23.3-11.6-46.5-23.2-69.8-34.9c-0.9-0.5-1.5-0.4-2.3,0.3c-1.7,1.6-3.5,3.2-5.4,4.5c-8.8,5.6-18.3,7.7-28.7,6 c-6.5-1.1-12.6-3.9-17.7-7.9c14.6,60,68.6,104.5,133.1,104.5c19,0,37.1-3.9,53.5-10.8C237.1,314.9,232.4,312.3,228.2,308.6z"/>
+    <path class="st0" d="M62.7,156.6c15.3-7.6,32.3-4.7,44.8,7c0.8,0.7,1.3,0.8,2.2,0.3c14.4-7.2,28.9-14.4,43.3-21.6 c20.1-10,40.1-20.1,60.2-30.1c1.3-0.7,1.6-1.4,1.5-2.8c-2.2-20.4,11.1-38.1,29.6-42.6c0.8-0.2,1.6-0.4,2.4-0.6 c-17.6-8.2-37.3-12.9-58-12.9C123,53.4,68.1,99.7,54.9,161.6C57.2,159.7,59.8,158,62.7,156.6z"/>
+  </g>
+  <path class="st0" d="M 190.3 32.1 C 211.7 32.1 232.4 36.3 251.9 44.5 C 270.7 52.5 287.7 63.9 302.2 78.4 C 316.7 92.9 328.2 109.9 336.1 128.7 C 344.3 148.2 348.5 168.9 348.5 190.3 C 348.5 211.7 344.3 232.4 336.1 251.9 C 328.1 270.7 316.7 287.7 302.2 302.2 C 287.7 316.7 270.7 328.2 251.9 336.1 C 232.4 344.3 211.7 348.5 190.3 348.5 C 168.9 348.5 148.2 344.3 128.7 336.1 C 109.9 328.1 92.9 316.7 78.4 302.2 C 63.9 287.7 52.4 270.7 44.5 251.9 C 36.3 232.4 32.1 211.7 32.1 190.3 C 32.1 168.9 36.3 148.2 44.5 128.7 C 52.5 109.9 63.9 92.9 78.4 78.4 C 92.9 63.9 109.9 52.4 128.7 44.5 C 148.2 36.3 168.9 32.1 190.3 32.1 M 190.3 0 C 85.2 0 0 85.2 0 190.3 C 0 295.4 85.2 380.6 190.3 380.6 C 295.4 380.6 380.6 295.4 380.6 190.3 C 380.6 85.2 295.4 0 190.3 0 Z"/>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-alarm.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-alarm.svg
new file mode 100644 (file)
index 0000000..66394be
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg enable-background="new 0 0 64 64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
+  <ellipse style="stroke-width: 0px; stroke: rgb(0, 0, 0); fill:#3d3c3c;" cx="32" cy="32" rx="30" ry="30"/>
+  <circle class="cls-1" cx="32.141" cy="31.8" r="17" style="fill: #b3b3b3;"/>
+  <line class="cls-2" x1="32.141" x2="32.141" y1="4.8" y2="10.8" style="fill: none; stroke: #b3b3b3; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 3px;"/>
+  <line class="cls-2" x1="32.141" x2="32.141" y1="52.8" y2="58.8" style="fill: none; stroke: #b3b3b3; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 3px;"/>
+  <line class="cls-2" x1="59.141" x2="53.141" y1="31.8" y2="31.8" style="fill: none; stroke: #b3b3b3; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 3px;"/>
+  <line class="cls-2" x1="11.141" x2="5.141" y1="31.8" y2="31.8" style="fill: none; stroke: #b3b3b3; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 3px;"/>
+  <line class="cls-2" x1="51.231" x2="46.991" y1="12.71" y2="16.95" style="fill: none; stroke: #b3b3b3; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 3px;"/>
+  <line class="cls-2" x1="17.291" x2="13.051" y1="46.65" y2="50.89" style="fill: none; stroke: #b3b3b3; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 3px;"/>
+  <line class="cls-2" x1="51.231" x2="46.991" y1="50.89" y2="46.65" style="fill: none; stroke: #b3b3b3; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 3px;"/>
+  <line class="cls-2" x1="17.291" x2="13.051" y1="16.95" y2="12.71" style="fill: none; stroke: #b3b3b3; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 3px;"/>
+  <path class="cls-3" d="M 24.931 27.55 L 24.931 33.5 C 24.931 35.28 25.601 36.18 26.801 36.18 C 28.001 36.18 28.701 35.32 28.701 33.5 L 28.701 27.55 L 31.031 27.55 L 31.031 33.34 C 31.031 36.53 29.421 38.04 26.731 38.04 C 24.041 38.04 22.591 36.6 22.591 33.31 L 22.591 27.55 L 24.931 27.55 Z" style="fill: rgb(255, 255, 255);"/>
+  <path class="cls-3" d="M 35.491 37.88 L 32.141 27.55 L 34.741 27.55 L 36.001 31.92 C 36.351 33.15 36.671 34.33 36.921 35.61 C 37.181 34.37 37.501 33.14 37.851 31.96 L 39.171 27.55 L 41.651 27.55 L 38.211 37.88 L 35.491 37.88 Z" style="fill: rgb(255, 255, 255);"/>
+</svg>
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-1.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-1.svg
new file mode 100644 (file)
index 0000000..2767a07
--- /dev/null
@@ -0,0 +1,53 @@
+<svg version="1.2" width="52.876" height="26.86mm" viewBox="1486 7056 1399 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M1486 7056h1399v2686H1486z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M1486 7056h1400v2687H1486z" />
+               <path fill="#143A79"
+                  d="M1693 7056h986c114 0 206 93 206 207v2272c0 114-92 207-206 207h-986c-114 0-207-93-207-207V7263c0-114 93-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M1702 7201h459v551h-459z" />
+               <path fill="#FFF"
+                  d="M1702 7562c0 113 101 189 228 189 129 0 230-76 230-189v-361h-98v352c0 75-58 115-132 115s-131-40-131-115v-352h-97v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M2204 7201h503v546h-503z" />
+               <path fill="#FFF" d="M2418 7746h76l212-545h-103l-146 415h-2l-146-415h-104l213 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M1716 7807h32v217h-32z" />
+               <path fill="#FFF" d="M1716 8023h31v-216h-31v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M1834 7807h154v217h-154z" />
+               <path fill="#FFF" d="M1834 8023h30v-153h1l93 153h29v-216h-31v154l-93-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M2073 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M2074 8023h69c30 0 51-16 63-36 9-15 12-23 12-72 0-45 0-53-11-72-14-24-36-36-62-36h-71v216zm30-186h37c17 0 27 5 36 20 9 11 10 21 10 59 0 40-1 46-8 57-8 13-20 19-38 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M2298 7807h132v217h-132z" />
+               <path fill="#FFF" d="M2298 8023h131v-31h-100v-63h85v-29h-85v-63h100v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M2477 7807h161v217h-161z" />
+               <path fill="#FFF" d="M2601 8023h36l-63-111 59-105h-36l-41 75-40-75h-35l58 105-62 111h35l44-80 45 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M1842 8110h480v1514h-480z" />
+               <path fill="#9BC307" d="M2081 9623h240V8110h-240l-238 157v230l238-157v1283z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-10.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-10.svg
new file mode 100644 (file)
index 0000000..de933d5
--- /dev/null
@@ -0,0 +1,58 @@
+<svg version="1.2" width="52.876" height="26.86mm" viewBox="16361 7056 1399 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M16361 7056h1399v2686h-1399z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M16361 7056h1401v2687h-1401z" />
+               <path fill="#143A79"
+                  d="M16568 7056h985c115 0 207 93 207 207v2272c0 114-92 207-207 207h-985c-115 0-207-93-207-207V7263c0-114 92-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M16576 7201h460v551h-460z" />
+               <path fill="#FFF"
+                  d="M16577 7562c0 113 101 189 229 189s229-76 229-189v-361h-98v352c0 75-57 115-131 115s-132-40-132-115v-352h-97v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M17080 7201h502v546h-502z" />
+               <path fill="#FFF" d="M17293 7746h76l212-545h-103l-146 415h-2l-147-415h-103l213 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M16590 7807h33v217h-33z" />
+               <path fill="#FFF" d="M16590 8023h32v-216h-32v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M16709 7807h154v217h-154z" />
+               <path fill="#FFF" d="M16709 8023h30v-153h1l93 153h29v-216h-31v154l-93-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M16948 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M16948 8023h69c31 0 52-16 64-36 10-15 12-23 12-72 0-45-1-53-12-72-13-24-35-36-62-36h-71v216zm31-186h37c17 0 27 5 36 20 9 11 9 21 9 59 0 40 0 46-7 57-8 13-21 19-38 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M17173 7807h132v217h-132z" />
+               <path fill="#FFF" d="M17173 8023h131v-31h-100v-63h85v-29h-85v-63h100v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M17352 7807h161v217h-161z" />
+               <path fill="#FFF" d="M17477 8023h35l-64-111 60-105h-35l-42 75-40-75h-35l58 105-62 111h35l44-80 46 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M16430 8115h364v1523h-364z" />
+               <path fill="#E22D12" d="M16611 9637h182V8115h-182l-181 158v232l181-159v1291z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M16901 8102h725v1548h-725z" />
+               <path fill="#E22D12"
+                  d="M17442 9199c0 147-72 233-179 233s-179-86-179-233v-645c0-148 72-234 179-234s179 86 179 234v645zm-541 13c0 279 174 437 362 437s361-158 361-437v-671c0-281-173-439-361-439s-362 158-362 439v671z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-11.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-11.svg
new file mode 100644 (file)
index 0000000..368dacd
--- /dev/null
@@ -0,0 +1,61 @@
+<svg version="1.2" width="14mm" height="26.86mm" viewBox="18034 7056 1400 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M18034 7056h1400v2686h-1400z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18034 7056h1401v2687h-1401z" />
+               <path fill="#143A79"
+                  d="M18241 7056h986c114 0 207 93 207 207v2272c0 114-93 207-207 207h-986c-114 0-207-93-207-207V7263c0-114 93-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18250 7201h459v551h-459z" />
+               <path fill="#FFF"
+                  d="M18250 7562c0 113 101 189 229 189s229-76 229-189v-361h-97v352c0 75-57 115-132 115s-131-40-131-115v-352h-98v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18753 7201h503v546h-503z" />
+               <path fill="#FFF" d="M18966 7746h75l214-545h-104l-147 415h-1l-147-415h-103l213 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18264 7807h33v217h-33z" />
+               <path fill="#FFF" d="M18264 8023h32v-216h-32v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18382 7807h154v217h-154z" />
+               <path fill="#FFF" d="M18382 8023h31v-153l93 153h29v-216h-30v154h-1l-93-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18622 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M18622 8023h70c30 0 51-16 63-36 9-15 12-23 12-72 0-45-1-53-11-72-13-24-35-36-62-36h-72v216zm31-186h38c16 0 26 5 36 20 8 11 9 21 9 59 0 40-1 46-8 57-8 13-20 19-37 19h-38v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18845 7807h133v217h-133z" />
+               <path fill="#FFF" d="M18846 8023h131v-31h-100v-63h86v-29h-86v-63h100v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M19025 7807h161v217h-161z" />
+               <path fill="#FFF" d="M19150 8023h35l-62-111 58-105h-35l-40 75-41-75h-36l60 105-64 111h36l45-80 44 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18103 8115h366v1523h-366z" />
+               <path fill="#9586B9" d="M18285 9637h182V8115h-182l-182 158v232l182-159v1291z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18609 8527h381v1111h-381z" />
+               <path fill="#9586B9" d="M18799 9637h190V8527h-190l-190 115v168l190-115v942z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M18909 8088h428v449h-428z" />
+               <path fill="#9586B9" d="M19089 8278h-180v69h180v189h65v-189h181v-69h-181v-190h-65v190z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-2.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-2.svg
new file mode 100644 (file)
index 0000000..1b1b8c4
--- /dev/null
@@ -0,0 +1,54 @@
+<svg version="1.2" width="52.876" height="26.86mm" viewBox="3139 7056 1399 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M3139 7056h1399v2686H3139z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M3139 7056h1400v2687H3139z" />
+               <path fill="#143A79"
+                  d="M3346 7056h985c115 0 207 93 207 207v2272c0 114-92 207-207 207h-985c-115 0-207-93-207-207V7263c0-114 92-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M3354 7201h461v551h-461z" />
+               <path fill="#FFF"
+                  d="M3354 7562c0 113 103 189 230 189s229-76 229-189v-361h-98v352c0 75-57 115-131 115s-131-40-131-115v-352h-99v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M3858 7201h502v546h-502z" />
+               <path fill="#FFF" d="M4070 7746h76l213-545h-103l-147 415h-2l-146-415h-103l212 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M3368 7807h33v217h-33z" />
+               <path fill="#FFF" d="M3368 8023h32v-216h-32v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M3486 7807h155v217h-155z" />
+               <path fill="#FFF" d="M3486 8023h31v-153h1l93 153h29v-216h-31v154h-1l-92-154h-30v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M3726 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M3726 8023h70c31 0 52-16 64-36 9-15 11-23 11-72 0-45-1-53-11-72-13-24-35-36-62-36h-72v216zm31-186h38c16 0 27 5 36 20 8 11 9 21 9 59 0 40-1 46-7 57-8 13-21 19-38 19h-38v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M3951 7807h132v217h-132z" />
+               <path fill="#FFF" d="M3951 8023h131v-31h-100v-63h85v-29h-85v-63h100v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M4130 7807h161v217h-161z" />
+               <path fill="#FFF" d="M4255 8023h35l-63-111 58-105h-34l-41 75-41-75h-35l59 105-63 111h35l45-80 45 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M3353 8097h955v1527h-955z" />
+               <path fill="#9BC307"
+                  d="M3353 9623h954v-217h-639l537-609c71-79 102-166 102-266 0-241-210-434-489-434-251 0-463 189-465 436h239c12-135 115-219 245-219 143 0 230 109 230 215 0 45-10 92-61 151l-653 739v204z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-3.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-3.svg
new file mode 100644 (file)
index 0000000..db47338
--- /dev/null
@@ -0,0 +1,54 @@
+<svg version="1.2" width="14mm" height="26.86mm" viewBox="4791 7056 1400 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M4791 7056h1400v2686H4791z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M4791 7056h1401v2687H4791z" />
+               <path fill="#143A79"
+                  d="M4999 7056h985c114 0 207 93 207 207v2272c0 114-93 207-207 207h-985c-115 0-208-93-208-207V7263c0-114 93-207 208-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M5006 7201h460v551h-460z" />
+               <path fill="#FFF"
+                  d="M5007 7562c0 113 101 189 229 189s229-76 229-189v-361h-97v352c0 75-57 115-132 115-74 0-131-40-131-115v-352h-98v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M5510 7201h503v546h-503z" />
+               <path fill="#FFF" d="M5723 7746h77l212-545h-103l-146 415h-2l-148-415h-103l213 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M5021 7807h33v217h-33z" />
+               <path fill="#FFF" d="M5021 8023h32v-216h-32v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M5139 7807h155v217h-155z" />
+               <path fill="#FFF" d="M5139 8023h31v-153h1l93 153h29v-216h-31v154h-1l-93-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M5379 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M5379 8023h69c30 0 52-16 65-36 9-15 11-23 11-72 0-45-1-53-11-72-14-24-36-36-63-36h-71v216zm31-186h37c16 0 27 5 36 20 8 11 9 21 9 59 0 40-1 46-8 57-8 13-20 19-37 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M5602 7807h133v217h-133z" />
+               <path fill="#FFF" d="M5603 8023h131v-31h-99v-63h85v-29h-85v-63h99v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M5783 7807h160v217h-160z" />
+               <path fill="#FFF" d="M5906 8023h36l-63-111 59-105h-36l-40 75-41-75h-34l58 105-62 111h34l45-80 44 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M4960 8096h985v1541h-985z" />
+               <path fill="#FFF200"
+                  d="M5344 8939h102c141 0 258 89 258 240 0 149-120 240-254 240-137 0-205-68-249-172h-240c45 253 249 389 475 389 285 0 508-183 508-463 0-124-57-251-198-332 139-80 179-197 179-312 0-222-195-432-493-432-239 0-443 185-462 400h240c26-124 129-183 231-183 134 0 244 95 244 219s-98 215-258 215h-83v191z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-4.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-4.svg
new file mode 100644 (file)
index 0000000..186c07c
--- /dev/null
@@ -0,0 +1,54 @@
+<svg version="1.2" width="14mm" height="26.86mm" viewBox="6444 7056 1400 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M6444 7056h1400v2686H6444z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M6444 7056h1401v2687H6444z" />
+               <path fill="#143A79"
+                  d="M6651 7056h985c115 0 208 93 208 207v2272c0 114-93 207-208 207h-985c-114 0-207-93-207-207V7263c0-114 93-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M6660 7201h459v551h-459z" />
+               <path fill="#FFF"
+                  d="M6660 7562c0 113 101 189 229 189 127 0 229-76 229-189v-361h-98v352c0 75-57 115-131 115-75 0-131-40-131-115v-352h-98v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M7163 7201h503v546h-503z" />
+               <path fill="#FFF" d="M7377 7746h75l213-545h-103l-147 415h-1l-147-415h-104l214 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M6674 7807h34v217h-34z" />
+               <path fill="#FFF" d="M6674 8023h33v-216h-33v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M6792 7807h154v217h-154z" />
+               <path fill="#FFF" d="M6792 8023h31v-153l92 153h30v-216h-31v154h-1l-92-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M7032 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M7032 8023h70c30 0 51-16 63-36 9-15 12-23 12-72 0-45-1-53-11-72-13-24-35-36-62-36h-72v216zm31-186h37c17 0 27 5 37 20 8 11 9 21 9 59 0 40-1 46-8 57-8 13-20 19-38 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M7256 7807h132v217h-132z" />
+               <path fill="#FFF" d="M7256 8023h131v-31h-100v-63h86v-29h-86v-63h100v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M7435 7807h161v217h-161z" />
+               <path fill="#FFF" d="M7560 8023h35l-62-111 58-105h-35l-40 75-42-75h-35l59 105-63 111h35l46-80 44 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M6611 8110h1073v1514H6611z" />
+               <path fill="#FFF200"
+                  d="M6611 9398h699v225h239v-225h134v-204h-134v-435h-239v435h-438l567-1084h-268l-560 1084v204z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-5.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-5.svg
new file mode 100644 (file)
index 0000000..44cd7a6
--- /dev/null
@@ -0,0 +1,54 @@
+<svg version="1.2" width="14mm" height="26.86mm" viewBox="8097 7056 1400 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M8097 7056h1400v2686H8097z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M8097 7056h1401v2687H8097z" />
+               <path fill="#143A79"
+                  d="M8304 7056h986c114 0 207 93 207 207v2272c0 114-93 207-207 207h-986c-114 0-207-93-207-207V7263c0-114 93-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M8312 7201h460v551h-460z" />
+               <path fill="#FFF"
+                  d="M8313 7562c0 113 101 189 229 189s229-76 229-189v-361h-98v352c0 75-57 115-131 115s-132-40-132-115v-352h-97v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M8816 7201h503v546h-503z" />
+               <path fill="#FFF" d="M9028 7746h76l214-545h-105l-146 415h-2l-146-415h-103l212 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M8327 7807h32v217h-32z" />
+               <path fill="#FFF" d="M8327 8023h31v-216h-31v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M8445 7807h154v217h-154z" />
+               <path fill="#FFF" d="M8445 8023h31v-153l92 153h30v-216h-32v154l-92-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M8685 7807h145v217h-145z" />
+               <path fill="#FFF"
+                  d="M8685 8023h69c30 0 52-16 64-36 9-15 11-23 11-72 0-45 0-53-10-72-14-24-37-36-63-36h-71v216zm30-186h37c17 0 27 5 36 20 10 11 11 21 11 59 0 40-1 46-9 57-8 13-20 19-38 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M8909 7807h132v217h-132z" />
+               <path fill="#FFF" d="M8909 8023h131v-31h-100v-63h85v-29h-85v-63h100v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M9088 7807h162v217h-162z" />
+               <path fill="#FFF" d="M9212 8023h36l-63-111 59-105h-36l-41 75-40-75h-35l58 105-62 111h35l44-80 45 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M8323 8110h956v1527h-956z" />
+               <path fill="#FFF200"
+                  d="M8353 8928h226c56-91 124-125 216-125 197 0 242 123 242 291 0 142 0 325-235 325-134 0-214-68-240-176h-239c35 282 272 393 488 393 167 0 295-83 363-162 73-83 103-161 103-363 0-250-40-325-131-414-61-59-173-110-299-110-104 0-188 25-268 82v-343h665v-216h-891v818z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-6.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-6.svg
new file mode 100644 (file)
index 0000000..459828e
--- /dev/null
@@ -0,0 +1,54 @@
+<svg version="1.2" width="52.876" height="26.86mm" viewBox="9750 7056 1399 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M9750 7056h1399v2686H9750z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M9750 7056h1400v2687H9750z" />
+               <path fill="#143A79"
+                  d="M9957 7056h985c115 0 207 93 207 207v2272c0 114-92 207-207 207h-985c-115 0-207-93-207-207V7263c0-114 92-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M9965 7201h461v551h-461z" />
+               <path fill="#FFF"
+                  d="M9965 7562c0 113 102 189 229 189 128 0 230-76 230-189v-361h-98v352c0 75-58 115-132 115s-131-40-131-115v-352h-98v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M10469 7201h502v546h-502z" />
+               <path fill="#FFF" d="M10681 7746h77l212-545h-103l-147 415h-2l-146-415h-103l212 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M9979 7807h33v217h-33z" />
+               <path fill="#FFF" d="M9979 8023h32v-216h-32v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M10097 7807h155v217h-155z" />
+               <path fill="#FFF" d="M10097 8023h32v-153h1l92 153h29v-216h-31v154l-92-154h-31v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M10337 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M10337 8023h70c31 0 52-16 64-36 9-15 11-23 11-72 0-45-1-53-11-72-13-24-35-36-62-36h-72v216zm32-186h37c17 0 27 5 36 20 9 11 9 21 9 59 0 40 0 46-7 57-8 13-21 19-38 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M10562 7807h132v217h-132z" />
+               <path fill="#FFF" d="M10562 8023h131v-31h-100v-63h85v-29h-85v-63h100v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M10741 7807h162v217h-162z" />
+               <path fill="#FFF" d="M10866 8023h35l-63-111 59-105h-35l-42 75-40-75h-35l58 105-62 111h35l44-80 46 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M9973 8110h960v1527h-960z" />
+               <path fill="#F28C00"
+                  d="M10037 8922c-43 77-64 164-64 253 0 284 234 461 466 461 249 0 493-138 493-485 0-293-187-420-399-420-40 0-91 6-127 19h-4l352-640h-268l-449 812zm416 0c132 0 240 79 240 249 0 180-129 248-240 248-145 0-239-79-239-248 0-170 108-249 239-249z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-7.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-7.svg
new file mode 100644 (file)
index 0000000..f2e2489
--- /dev/null
@@ -0,0 +1,53 @@
+<svg version="1.2" width="14mm" height="26.86mm" viewBox="11402 7056 1400 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M11402 7056h1400v2686h-1400z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M11402 7056h1401v2687h-1401z" />
+               <path fill="#143A79"
+                  d="M11609 7056h986c114 0 207 93 207 207v2272c0 114-93 207-207 207h-986c-114 0-207-93-207-207V7263c0-114 93-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M11618 7201h459v551h-459z" />
+               <path fill="#FFF"
+                  d="M11618 7562c0 113 102 189 230 189 127 0 228-76 228-189v-361h-97v352c0 75-57 115-131 115s-131-40-131-115v-352h-99v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M12121 7201h503v546h-503z" />
+               <path fill="#FFF" d="M12335 7746h76l212-545h-103l-146 415h-2l-148-415h-103l214 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M11632 7807h33v217h-33z" />
+               <path fill="#FFF" d="M11632 8023h32v-216h-32v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M11750 7807h155v217h-155z" />
+               <path fill="#FFF" d="M11750 8023h32v-153h1l92 153h29v-216h-31v154h-1l-93-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M11990 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M11990 8023h69c31 0 53-16 65-36 9-15 11-23 11-72 0-45-1-53-11-72-13-24-35-36-63-36h-71v216zm31-186h37c16 0 28 5 37 20 8 11 9 21 9 59 0 40-1 46-8 57-8 13-21 19-38 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M12215 7807h131v217h-131z" />
+               <path fill="#FFF" d="M12215 8023h130v-31h-100v-63h86v-29h-86v-63h100v-30h-130v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M12394 7807h160v217h-160z" />
+               <path fill="#FFF" d="M12518 8023h35l-62-111 58-105h-35l-40 75-41-75h-35l59 105-63 111h35l45-80 44 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M11660 8110h954v1514h-954z" />
+               <path fill="#F28C00" d="M11661 8546h241v-219h444l-567 1296h268l566-1296v-217h-952v436z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-8.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-8.svg
new file mode 100644 (file)
index 0000000..bd10d4b
--- /dev/null
@@ -0,0 +1,54 @@
+<svg version="1.2" width="14mm" height="26.86mm" viewBox="13055 7056 1400 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M13055 7056h1400v2686h-1400z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13055 7056h1401v2687h-1401z" />
+               <path fill="#143A79"
+                  d="M13262 7056h986c114 0 207 93 207 207v2272c0 114-93 207-207 207h-986c-114 0-207-93-207-207V7263c0-114 93-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13270 7201h460v551h-460z" />
+               <path fill="#FFF"
+                  d="M13271 7562c0 113 101 189 230 189 127 0 228-76 228-189v-361h-97v352c0 75-57 115-131 115-75 0-132-40-132-115v-352h-98v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13773 7201h504v546h-504z" />
+               <path fill="#FFF" d="M13987 7746h75l214-545h-104l-147 415h-1l-147-415h-103l213 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13285 7807h33v217h-33z" />
+               <path fill="#FFF" d="M13285 8023h32v-216h-32v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13403 7807h154v217h-154z" />
+               <path fill="#FFF" d="M13403 8023h31v-153l93 153h29v-216h-30v154h-1l-93-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13642 7807h147v217h-147z" />
+               <path fill="#FFF"
+                  d="M13643 8023h70c30 0 51-16 63-36 9-15 12-23 12-72 0-45-1-53-11-72-13-24-35-36-62-36h-72v216zm32-186h37c16 0 26 5 36 20 8 11 9 21 9 59 0 40-1 46-8 57-8 13-20 19-37 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13867 7807h134v217h-134z" />
+               <path fill="#FFF" d="M13867 8023h132v-31h-100v-63h85v-29h-85v-63h100v-30h-132v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M14046 7807h162v217h-162z" />
+               <path fill="#FFF" d="M14171 8023h35l-62-111 58-105h-35l-41 75-41-75h-35l59 105-63 111h35l45-80 45 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13248 8096h1021v1541h-1021z" />
+               <path fill="#E22D12"
+                  d="M13518 8531c0-143 118-217 241-217 122 0 239 74 239 217s-117 217-239 217c-123 0-241-74-241-217zm-270 650c0 268 233 455 511 455 277 0 509-187 509-455 0-142-70-263-197-340 99-80 167-174 167-305 0-246-209-439-479-439-271 0-480 193-480 439 0 131 68 225 167 305-127 77-198 198-198 340zm240-2c0-138 127-240 271-240 143 0 270 102 270 240s-127 240-270 240c-144 0-271-102-271-240z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-9.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index-9.svg
new file mode 100644 (file)
index 0000000..da658b9
--- /dev/null
@@ -0,0 +1,54 @@
+<svg version="1.2" width="14mm" height="26.86mm" viewBox="14708 7056 1400 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M14708 7056h1400v2686h-1400z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M14708 7056h1401v2687h-1401z" />
+               <path fill="#143A79"
+                  d="M14915 7056h985c114 0 208 93 208 207v2272c0 114-94 207-208 207h-985c-114 0-207-93-207-207V7263c0-114 93-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M14924 7201h459v551h-459z" />
+               <path fill="#FFF"
+                  d="M14924 7562c0 113 101 189 228 189 128 0 230-76 230-189v-361h-99v352c0 75-57 115-131 115s-131-40-131-115v-352h-97v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M15426 7201h504v546h-504z" />
+               <path fill="#FFF" d="M15639 7746h76l214-545h-103l-148 415h-2l-146-415h-103l212 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M14938 7807h32v217h-32z" />
+               <path fill="#FFF" d="M14938 8023h31v-216h-31v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M15056 7807h154v217h-154z" />
+               <path fill="#FFF" d="M15056 8023h31v-153l93 153h29v-216h-31v154l-93-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M15296 7807h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M15296 8023h69c31 0 52-16 64-36 9-15 12-23 12-72 0-45-1-53-11-72-13-24-35-36-63-36h-71v216zm30-186h37c18 0 28 5 38 20 8 11 9 21 9 59 0 40-1 46-8 57-8 13-20 19-39 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M15520 7807h132v217h-132z" />
+               <path fill="#FFF" d="M15520 8023h131v-31h-99v-63h84v-29h-84v-63h99v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M15699 7807h161v217h-161z" />
+               <path fill="#FFF" d="M15824 8023h35l-62-111 58-105h-35l-41 75-40-75h-36l59 105-63 111h36l44-80 45 80z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M14932 8097h960v1527h-960z" />
+               <path fill="#E22D12"
+                  d="M15827 8812c43-77 64-164 64-253 0-286-234-462-466-462-249 0-493 138-493 485 0 293 187 421 399 421 40 0 91-7 127-19h4l-352 639h268l449-811zm-416 0c-132 0-240-79-240-249 0-180 129-249 240-249 145 0 239 79 239 249s-108 249-239 249z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file
diff --git a/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index.svg b/bundles/org.openhab.binding.openuv/src/main/resources/icon/uv-index.svg
new file mode 100755 (executable)
index 0000000..ed6cb5f
--- /dev/null
@@ -0,0 +1,50 @@
+<svg version="1.2" width="52.876" height="26.86mm" viewBox="13400 10314 1399 2686" preserveAspectRatio="xMidYMid"
+   fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+   <defs class="prefix__ClipPathGroup">
+      <clipPath id="prefix__a" clipPathUnits="userSpaceOnUse">
+         <path d="M13400 10314h1399v2686h-1399z" />
+      </clipPath>
+   </defs>
+   <g class="prefix__SlideGroup">
+      <g class="prefix__Slide" clip-path="url(#prefix__a)">
+         <g class="prefix__Page">
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13400 10314h1400v2687h-1400z" />
+               <path fill="#143A79"
+                  d="M13607 10314h986c114 0 206 93 206 207v2272c0 114-92 207-206 207h-986c-114 0-207-93-207-207v-2272c0-114 93-207 207-207z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13616 10459h459v551h-459z" />
+               <path fill="#FFF"
+                  d="M13616 10820c0 113 101 189 228 189 129 0 230-76 230-189v-361h-98v352c0 75-58 115-132 115s-131-40-131-115v-352h-97v361z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M14118 10459h503v546h-503z" />
+               <path fill="#FFF" d="M14332 11004h76l212-545h-103l-146 415h-2l-146-415h-104l213 545z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13630 11065h32v217h-32z" />
+               <path fill="#FFF" d="M13630 11281h31v-216h-31v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13748 11065h154v217h-154z" />
+               <path fill="#FFF" d="M13748 11281h30v-153h1l93 153h29v-216h-31v154l-93-154h-29v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_ClosedBezierShape">
+               <path class="prefix__BoundingBox" fill="none" d="M13987 11065h146v217h-146z" />
+               <path fill="#FFF"
+                  d="M13988 11281h69c30 0 51-16 63-36 9-15 12-23 12-72 0-45 0-53-11-72-14-24-36-36-62-36h-71v216zm30-186h37c17 0 27 5 36 20 9 11 10 21 10 59 0 40-1 46-8 57-8 13-20 19-38 19h-37v-155z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M14212 11065h132v217h-132z" />
+               <path fill="#FFF" d="M14212 11281h131v-31h-100v-63h85v-29h-85v-63h100v-30h-131v216z" />
+            </g>
+            <g class="prefix__com_sun_star_drawing_PolyPolygonShape">
+               <path class="prefix__BoundingBox" fill="none" d="M14391 11065h161v217h-161z" />
+               <path fill="#FFF"
+                  d="M14515 11281h36l-63-111 59-105h-36l-41 75-40-75h-35l58 105-62 111h35l44-80 45 80z" />
+            </g>
+         </g>
+      </g>
+   </g>
+</svg>
\ No newline at end of file