diff --git a/bundles/org.openhab.binding.meteoalerte/README.md b/bundles/org.openhab.binding.meteoalerte/README.md index 7d127ac9f..29bccfe74 100644 --- a/bundles/org.openhab.binding.meteoalerte/README.md +++ b/bundles/org.openhab.binding.meteoalerte/README.md @@ -27,7 +27,8 @@ The Météo Alerte information that are retrieved is available as these channels | Channel ID | Item Type | Description | |-----------------------|-----------|-----------------------------------------------| -| observation-time | DateTime | Date and time of alert creation | +| observation-time | DateTime | Date and time of report validity start | +| end-time | DateTime | Date and time of report validity end | | comment | String | General comments on alerts for the department | | vent | String | Wind alert level (*) | | pluie-inondation | String | Rain alert level (*) | @@ -37,6 +38,7 @@ The Météo Alerte information that are retrieved is available as these channels | canicule | String | Heat alert level (*) | | grand-froid | String | Cold alert level (*) | | avalanches | String | Avalanche alert level (*) | +| vague-submersion | String | Wave submersion alert level (*) | | pluie-inondation-icon | Image | Pictogram of the Rain alert level | | vent-icon | Image | Pictogram of the Wind alert level | | orage-icon | Image | Pictogram of Storm alert level | @@ -45,6 +47,7 @@ The Météo Alerte information that are retrieved is available as these channels | canicule-icon | Image | Pictogram of Heat alert level | | grand-froid-icon | Image | Pictogram of Cold alert level | | avalanches-icon | Image | Pictogram of Avalanche alert level | +| vague-submersion-icon | Image | Pictogram of Wave Submersion alert level | (*) Each alert level is described by a color : diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteBindingConstants.java b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteBindingConstants.java index 1e7450eaf..f238f240c 100644 --- a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteBindingConstants.java +++ b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteBindingConstants.java @@ -12,9 +12,6 @@ */ package org.openhab.binding.meteoalerte.internal; -import java.util.Collections; -import java.util.Set; - import org.eclipse.jdt.annotation.NonNullByDefault; import org.openhab.core.thing.ThingTypeUID; @@ -33,6 +30,7 @@ public class MeteoAlerteBindingConstants { public static final ThingTypeUID THING_TYPE_METEO_ALERT = new ThingTypeUID(BINDING_ID, "department"); // List of all Channel id's + public static final String WAVE = "vague-submersion"; public static final String AVALANCHE = "avalanches"; public static final String HEAT = "canicule"; public static final String FREEZE = "grand-froid"; @@ -41,16 +39,7 @@ public class MeteoAlerteBindingConstants { public static final String STORM = "orage"; public static final String RAIN = "pluie-inondation"; public static final String WIND = "vent"; - public static final String WIND_ICON = "vent-icon"; - public static final String RAIN_ICON = "pluie-inondation-icon"; - public static final String STORM_ICON = "orage-icon"; - public static final String FLOOD_ICON = "inondation-icon"; - public static final String SNOW_ICON = "neige-icon"; - public static final String HEAT_ICON = "canicule-icon"; - public static final String FREEZE_ICON = "grand-froid-icon"; - public static final String AVALANCHE_ICON = "avalanches-icon"; public static final String OBSERVATION_TIME = "observation-time"; + public static final String END_TIME = "end-time"; public static final String COMMENT = "comment"; - - public static final Set SUPPORTED_THING_TYPES_UIDS = Collections.singleton(THING_TYPE_METEO_ALERT); } diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteConfiguration.java b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteConfiguration.java index 1bf3accca..ba4c65952 100644 --- a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteConfiguration.java +++ b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteConfiguration.java @@ -23,5 +23,5 @@ import org.eclipse.jdt.annotation.NonNullByDefault; @NonNullByDefault public class MeteoAlerteConfiguration { public String department = ""; - public Integer refresh = 1440; + public int refresh = 1440; } diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteHandlerFactory.java b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteHandlerFactory.java index 668f9b30e..50e005430 100644 --- a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteHandlerFactory.java +++ b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/MeteoAlerteHandlerFactory.java @@ -12,7 +12,7 @@ */ package org.openhab.binding.meteoalerte.internal; -import static org.openhab.binding.meteoalerte.internal.MeteoAlerteBindingConstants.*; +import static org.openhab.binding.meteoalerte.internal.MeteoAlerteBindingConstants.THING_TYPE_METEO_ALERT; import java.time.ZonedDateTime; @@ -43,31 +43,25 @@ import com.google.gson.JsonDeserializer; @NonNullByDefault public class MeteoAlerteHandlerFactory extends BaseThingHandlerFactory { private final Gson gson; - // Needed for converting UTC time to local time - private final TimeZoneProvider timeZoneProvider; @Activate public MeteoAlerteHandlerFactory(@Reference TimeZoneProvider timeZoneProvider) { - this.timeZoneProvider = timeZoneProvider; - this.gson = new GsonBuilder() - .registerTypeAdapter(ZonedDateTime.class, (JsonDeserializer) (json, type, - jsonDeserializationContext) -> ZonedDateTime.parse(json.getAsJsonPrimitive().getAsString())) + this.gson = new GsonBuilder().registerTypeAdapter(ZonedDateTime.class, + (JsonDeserializer) (json, type, jsonDeserializationContext) -> ZonedDateTime + .parse(json.getAsJsonPrimitive().getAsString()) + .withZoneSameInstant(timeZoneProvider.getTimeZone())) .create(); } @Override public boolean supportsThingType(ThingTypeUID thingTypeUID) { - return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID); + return THING_TYPE_METEO_ALERT.equals(thingTypeUID); } @Override protected @Nullable ThingHandler createHandler(Thing thing) { ThingTypeUID thingTypeUID = thing.getThingTypeUID(); - if (thingTypeUID.equals(THING_TYPE_METEO_ALERT)) { - return new MeteoAlerteHandler(thing, timeZoneProvider, gson); - } - - return null; + return supportsThingType(thingTypeUID) ? new MeteoAlerteHandler(thing, gson) : null; } } diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/handler/MeteoAlerteHandler.java b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/handler/MeteoAlerteHandler.java index a71ecbb92..d77438a38 100644 --- a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/handler/MeteoAlerteHandler.java +++ b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/handler/MeteoAlerteHandler.java @@ -14,24 +14,24 @@ package org.openhab.binding.meteoalerte.internal.handler; import static org.openhab.binding.meteoalerte.internal.MeteoAlerteBindingConstants.*; -import java.io.BufferedInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; +import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import java.net.MalformedURLException; -import java.net.URL; import java.time.ZonedDateTime; +import java.util.AbstractMap; import java.util.Arrays; -import java.util.List; +import java.util.Map; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.meteoalerte.internal.MeteoAlerteConfiguration; import org.openhab.binding.meteoalerte.internal.json.ApiResponse; -import org.openhab.core.i18n.TimeZoneProvider; +import org.openhab.binding.meteoalerte.internal.json.ResponseFieldDTO.AlertLevel; import org.openhab.core.io.net.http.HttpUtil; import org.openhab.core.library.types.DateTimeType; import org.openhab.core.library.types.RawType; @@ -44,6 +44,7 @@ import org.openhab.core.thing.binding.BaseThingHandler; import org.openhab.core.types.Command; import org.openhab.core.types.RefreshType; import org.openhab.core.types.UnDefType; +import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,18 +63,21 @@ public class MeteoAlerteHandler extends BaseThingHandler { + "facet=etat_vent&facet=etat_pluie_inondation&facet=etat_orage&facet=etat_inondation&facet=etat_neige&facet=etat_canicule&" + "facet=etat_grand_froid&facet=etat_avalanches&refine.nom_dept="; private static final int TIMEOUT_MS = 30000; - private static final List ALERT_LEVELS = Arrays.asList("Vert", "Jaune", "Orange", "Rouge"); - private final Logger logger = LoggerFactory.getLogger(MeteoAlerteHandler.class); + private static final Map ALERT_COLORS = Map.ofEntries( + new AbstractMap.SimpleEntry(AlertLevel.GREEN, "00ff00"), + new AbstractMap.SimpleEntry(AlertLevel.YELLOW, "ffff00"), + new AbstractMap.SimpleEntry(AlertLevel.ORANGE, "ff6600"), + new AbstractMap.SimpleEntry(AlertLevel.RED, "ff0000"), + new AbstractMap.SimpleEntry(AlertLevel.UNKNOWN, "b3b3b3")); + private final Logger logger = LoggerFactory.getLogger(MeteoAlerteHandler.class); // Time zone provider representing time zone configured in openHAB configuration - private final TimeZoneProvider timeZoneProvider; private final Gson gson; private @Nullable ScheduledFuture refreshJob; private String queryUrl = ""; - public MeteoAlerteHandler(Thing thing, TimeZoneProvider timeZoneProvider, Gson gson) { + public MeteoAlerteHandler(Thing thing, Gson gson) { super(thing); - this.timeZoneProvider = timeZoneProvider; this.gson = gson; } @@ -120,7 +124,6 @@ public class MeteoAlerteHandler extends BaseThingHandler { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, String.format("Querying '%s' raised : %s", queryUrl, e.getMessage())); } catch (IOException e) { - logger.warn("Error opening connection to Meteo Alerte webservice : {}", e.getMessage()); updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage()); } } @@ -133,74 +136,49 @@ public class MeteoAlerteHandler extends BaseThingHandler { private void updateChannels(ApiResponse apiResponse) { Arrays.stream(apiResponse.getRecords()).findFirst() .ifPresent((record) -> record.getResponseFieldDTO().ifPresent(fields -> { - updateAlertString(WIND, fields.getVent()); - updateAlertString(RAIN, fields.getPluieInondation()); - updateAlertString(STORM, fields.getOrage()); - updateAlertString(FLOOD, fields.getInondation()); - updateAlertString(SNOW, fields.getNeige()); - updateAlertString(HEAT, fields.getCanicule()); - updateAlertString(FREEZE, fields.getGrandFroid()); - updateAlertString(AVALANCHE, fields.getAvalanches()); - - fields.getDateInsert().ifPresent(date -> updateDate(OBSERVATION_TIME, date)); + updateAlert(WIND, fields.getVent()); + updateAlert(RAIN, fields.getPluieInondation()); + updateAlert(STORM, fields.getOrage()); + updateAlert(FLOOD, fields.getInondation()); + updateAlert(SNOW, fields.getNeige()); + updateAlert(HEAT, fields.getCanicule()); + updateAlert(FREEZE, fields.getGrandFroid()); + updateAlert(AVALANCHE, fields.getAvalanches()); + updateAlert(WAVE, fields.getVagueSubmersion()); updateState(COMMENT, new StringType(fields.getVigilanceComment())); - updateIcon(WIND, fields.getVent()); - updateIcon(RAIN, fields.getPluieInondation()); - updateIcon(STORM, fields.getOrage()); - updateIcon(FLOOD, fields.getInondation()); - updateIcon(SNOW, fields.getNeige()); - updateIcon(HEAT, fields.getCanicule()); - updateIcon(FREEZE, fields.getGrandFroid()); - updateIcon(AVALANCHE, fields.getAvalanches()); + fields.getDateInsert().ifPresent(date -> updateDate(OBSERVATION_TIME, date)); + fields.getDatePrevue().ifPresent(date -> updateDate(END_TIME, date)); })); } - public void updateIcon(String channelId, String value) { - String iconChannelId = channelId + "-icon"; - if (isLinked(iconChannelId)) { - String pictoName = channelId + (!value.isEmpty() ? "_" + value.toLowerCase() : ""); - byte[] image = getImage("picto" + File.separator + pictoName + ".gif"); - if (image != null) { - RawType picto = new RawType(image, "image/gif"); - updateState(iconChannelId, picto); - } - } - } - - private byte @Nullable [] getImage(String iconPath) { - URL url = FrameworkUtil.getBundle(getClass()).getResource(iconPath); - logger.debug("Path to icon image resource is: {}", url); - try (InputStream in = new BufferedInputStream(url.openStream())) { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - int next = in.read(); - while (next > -1) { - bos.write(next); - next = in.read(); - } - bos.flush(); - return bos.toByteArray(); + public @Nullable String getResource(String iconPath) { + Bundle bundle = FrameworkUtil.getBundle(getClass()); + try (InputStream stream = bundle.getResource(iconPath).openStream()) { + return new BufferedReader(new InputStreamReader(stream)).lines().collect(Collectors.joining("\n")); } catch (IOException e) { - logger.debug("I/O exception occurred getting image data: {}", e.getMessage(), e); + logger.warn("Unable to load ressource '{}' : {}", iconPath, e.getMessage()); } return null; } - public void updateAlertString(String channelId, String value) { - if (!value.isEmpty() && isLinked(channelId)) { - int level = ALERT_LEVELS.indexOf(value); - if (level != -1) { - updateState(channelId, new StringType(Integer.toString(level))); - } else { - updateState(channelId, UnDefType.UNDEF); - logger.warn("Value {} is not a valid alert level for channel {}", value, channelId); + public void updateAlert(String channelId, AlertLevel value) { + String channelIcon = channelId + "-icon"; + if (isLinked(channelId)) { + updateState(channelId, value != AlertLevel.UNKNOWN ? new StringType(value.name()) : UnDefType.UNDEF); + } + if (isLinked(channelIcon)) { + String resource = getResource(String.format("picto/%s.svg", channelId)); + if (resource != null) { + resource = resource.replaceAll(ALERT_COLORS.get(AlertLevel.UNKNOWN), ALERT_COLORS.get(value)); } + updateState(channelIcon, + resource != null ? new RawType(resource.getBytes(), "image/svg+xml") : UnDefType.UNDEF); } } public void updateDate(String channelId, ZonedDateTime zonedDateTime) { if (isLinked(channelId)) { - ZonedDateTime localDateTime = zonedDateTime.withZoneSameInstant(timeZoneProvider.getTimeZone()); - updateState(channelId, new DateTimeType(localDateTime)); + updateState(channelId, new DateTimeType(zonedDateTime)); } } } diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/json/ResponseFieldDTO.java b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/json/ResponseFieldDTO.java index 75ce458c5..db0ecb92d 100644 --- a/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/json/ResponseFieldDTO.java +++ b/bundles/org.openhab.binding.meteoalerte/src/main/java/org/openhab/binding/meteoalerte/internal/json/ResponseFieldDTO.java @@ -28,33 +28,45 @@ import com.google.gson.annotations.SerializedName; */ @NonNullByDefault public class ResponseFieldDTO { + public enum AlertLevel { + UNKNOWN, + @SerializedName("Vert") + GREEN, + @SerializedName("Jaune") + YELLOW, + @SerializedName("Orange") + ORANGE, + @SerializedName("Rouge") + RED; + } + @SerializedName("nom_reg") private String nomReg = ""; @SerializedName("typeprev") private String typePrev = ""; @SerializedName("etat_canicule") - private String canicule = ""; + private AlertLevel canicule = AlertLevel.UNKNOWN; @SerializedName("nom_dept") private String nomDept = ""; @SerializedName("etat_grand_froid") - private String grandFroid = ""; + private AlertLevel grandFroid = AlertLevel.UNKNOWN;; @SerializedName("noversion") private String noVersion = ""; @SerializedName("etat_pluie_inondation") - private String pluieInondation = ""; + private AlertLevel pluieInondation = AlertLevel.UNKNOWN;; @SerializedName("etat_neige") - private String neige = ""; + private AlertLevel neige = AlertLevel.UNKNOWN;; @SerializedName("etat_vent") - private String vent = ""; + private AlertLevel vent = AlertLevel.UNKNOWN;; @SerializedName("etat_inondation") - private String inondation = ""; + private AlertLevel inondation = AlertLevel.UNKNOWN;; @SerializedName("etat_avalanches") - private String avalanches = ""; + private AlertLevel avalanches = AlertLevel.UNKNOWN;; @SerializedName("etat_orage") - private String orage = ""; + private AlertLevel orage = AlertLevel.UNKNOWN; private int echeance; @SerializedName("etat_vague_submersion") - private String vagueSubmersion = ""; + private AlertLevel vagueSubmersion = AlertLevel.UNKNOWN;; private String dep = ""; @SerializedName("vigilancecommentaire_texte") private String vigilanceComment = ""; @@ -85,7 +97,7 @@ public class ResponseFieldDTO { return typePrev; } - public String getCanicule() { + public AlertLevel getCanicule() { return canicule; } @@ -93,7 +105,7 @@ public class ResponseFieldDTO { return nomDept; } - public String getGrandFroid() { + public AlertLevel getGrandFroid() { return grandFroid; } @@ -101,15 +113,15 @@ public class ResponseFieldDTO { return noVersion; } - public String getPluieInondation() { + public AlertLevel getPluieInondation() { return pluieInondation; } - public String getNeige() { + public AlertLevel getNeige() { return neige; } - public String getVent() { + public AlertLevel getVent() { return vent; } @@ -121,15 +133,15 @@ public class ResponseFieldDTO { return Optional.empty(); } - public String getInondation() { + public AlertLevel getInondation() { return inondation; } - public String getAvalanches() { + public AlertLevel getAvalanches() { return avalanches; } - public String getOrage() { + public AlertLevel getOrage() { return orage; } @@ -137,7 +149,7 @@ public class ResponseFieldDTO { return echeance; } - public String getVagueSubmersion() { + public AlertLevel getVagueSubmersion() { return vagueSubmersion; } diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.meteoalerte/src/main/resources/OH-INF/thing/thing-types.xml index 5b8ac5553..b83f35eeb 100644 --- a/bundles/org.openhab.binding.meteoalerte/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/OH-INF/thing/thing-types.xml @@ -9,6 +9,9 @@ Fournit les niveaux d'alerte météo pour un département. + + + @@ -33,32 +36,40 @@ + + + - + - + - + - + - + - + - + - + - + + + + + + @@ -178,10 +189,10 @@ - - - - + + + + @@ -192,10 +203,10 @@ - + DateTime - Date et heure d'observation. + time diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches.gif deleted file mode 100644 index 4f4413458..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches.svg new file mode 100644 index 000000000..71b6a81d1 --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches.svg @@ -0,0 +1,70 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_jaune.gif deleted file mode 100644 index 34e8f9099..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_orange.gif deleted file mode 100644 index cf8314875..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_red.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_red.gif deleted file mode 100644 index 44b93a879..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_red.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_vert.gif deleted file mode 100644 index 9122bc522..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/avalanches_vert.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule.gif deleted file mode 100644 index c9799bcaa..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule.svg new file mode 100644 index 000000000..b36c3b0fe --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule.svg @@ -0,0 +1,74 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_jaune.gif deleted file mode 100644 index cf66fe2bb..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_orange.gif deleted file mode 100644 index 31e067988..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_rouge.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_rouge.gif deleted file mode 100644 index 998ea7eac..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_rouge.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_vert.gif deleted file mode 100644 index a0dada195..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/canicule_vert.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid.gif deleted file mode 100644 index b8c79b4c0..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid.svg new file mode 100644 index 000000000..c959764d6 --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid.svg @@ -0,0 +1,79 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_jaune.gif deleted file mode 100644 index 24fe341bc..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_orange.gif deleted file mode 100644 index 2a3b68936..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_rouge.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_rouge.gif deleted file mode 100644 index 576e76e7f..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_rouge.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_vert.gif deleted file mode 100644 index 64ddbfef6..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/grand-froid_vert.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation.gif deleted file mode 100644 index 6408998fa..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation.svg new file mode 100644 index 000000000..f0271ee49 --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation.svg @@ -0,0 +1,69 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_jaune.gif deleted file mode 100644 index 3e9bf4f09..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_orange.gif deleted file mode 100644 index be36cbc87..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_rouge.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_rouge.gif deleted file mode 100644 index a85d88904..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_rouge.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_vert.gif deleted file mode 100644 index dd5f9cc14..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/inondation_vert.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige.gif deleted file mode 100644 index 74f6e3f65..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige.svg new file mode 100644 index 000000000..fe99a1157 --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige.svg @@ -0,0 +1,69 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_jaune.gif deleted file mode 100644 index 7b4fbe034..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_orange.gif deleted file mode 100644 index d113fa6cb..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_rouge.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_rouge.gif deleted file mode 100644 index 7679dbf67..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_rouge.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_vert.gif deleted file mode 100644 index f37211940..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/neige_vert.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage.gif deleted file mode 100644 index 3a5ec3706..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage.svg new file mode 100644 index 000000000..01ea1102b --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage.svg @@ -0,0 +1,69 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_jaune.gif deleted file mode 100644 index 0a2445274..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_orange.gif deleted file mode 100644 index 343829658..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_rouge.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_rouge.gif deleted file mode 100644 index f3bde71f6..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_rouge.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_vert.gif deleted file mode 100644 index d2eb3932b..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/orage_vert.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation.gif deleted file mode 100644 index c2df1f447..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation.svg new file mode 100644 index 000000000..7f7fd0e6a --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation.svg @@ -0,0 +1,74 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_jaune.gif deleted file mode 100644 index b6f713dc2..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_orange.gif deleted file mode 100644 index a06825ddf..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_rouge.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_rouge.gif deleted file mode 100644 index e45db4031..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_rouge.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_vert.gif deleted file mode 100644 index c1c9e4977..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/pluie-inondation_vert.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague-submersion.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague-submersion.svg new file mode 100644 index 000000000..4937e2125 --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague-submersion.svg @@ -0,0 +1,74 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague.gif deleted file mode 100644 index ce6a07d9f..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_jaune.gif deleted file mode 100644 index 74ba13ce2..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_orange.gif deleted file mode 100644 index 176232848..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_rouge.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_rouge.gif deleted file mode 100644 index dd6adfcb7..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_rouge.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_vert.gif deleted file mode 100644 index bb8608fa9..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vague_vert.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent.gif deleted file mode 100644 index a7b92c335..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent.svg b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent.svg new file mode 100644 index 000000000..93333fdab --- /dev/null +++ b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent.svg @@ -0,0 +1,84 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_jaune.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_jaune.gif deleted file mode 100644 index b8967a50e..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_jaune.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_orange.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_orange.gif deleted file mode 100644 index 794e81cdc..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_orange.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_rouge.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_rouge.gif deleted file mode 100644 index 90e2704da..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_rouge.gif and /dev/null differ diff --git a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_vert.gif b/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_vert.gif deleted file mode 100644 index e41677136..000000000 Binary files a/bundles/org.openhab.binding.meteoalerte/src/main/resources/picto/vent_vert.gif and /dev/null differ