diff --git a/bundles/org.openhab.binding.openweathermap/README.md b/bundles/org.openhab.binding.openweathermap/README.md index a043f07e9..7960595e6 100644 --- a/bundles/org.openhab.binding.openweathermap/README.md +++ b/bundles/org.openhab.binding.openweathermap/README.md @@ -70,7 +70,7 @@ Once the system location will be changed, the background discovery updates the c | Parameter | Description | |-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | apikey | API key to access the OpenWeatherMap API. **Mandatory** | -| refreshInterval | Specifies the refresh interval (in minutes). Optional, the default value is 60, the minimum value is 10. | +| refreshInterval | Specifies the refresh interval (in minutes). Optional, the default value is 60, the minimum value is 1. | | language | Language to be used by the OpenWeatherMap API. Optional, valid values are: `ar`, `bg`, `ca`, `de`, `el`, `en`, `es`, `fa`, `fi`, `fr`, `gl`, `hr`, `hu`, `it`, `ja`, `kr`, `la`, `lt`, `mk`, `nl`, `pl`, `pt`, `ro`, `ru`, `se`, `sk`, `sl`, `tr`, `ua`, `vi`, `zh_cn`, `zh_tw`. | ### Current Weather And Forecast diff --git a/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapAPIHandler.java b/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapAPIHandler.java index 654d940cf..644065d14 100644 --- a/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapAPIHandler.java +++ b/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapAPIHandler.java @@ -80,7 +80,7 @@ public class OpenWeatherMapAPIHandler extends BaseBridgeHandler { configValid = false; } int refreshInterval = config.refreshInterval; - if (refreshInterval < 10) { + if (refreshInterval < 1) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "@text/offline.conf-error-not-supported-refreshInterval"); configValid = false; diff --git a/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapOneCallHandler.java b/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapOneCallHandler.java index 9cd2d0308..60a4082e3 100644 --- a/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapOneCallHandler.java +++ b/bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/handler/OpenWeatherMapOneCallHandler.java @@ -382,7 +382,8 @@ public class OpenWeatherMapOneCallHandler extends AbstractOpenWeatherMapHandler channelGroupId); return; } - if (localWeatherData != null && localWeatherData.getMinutely().size() > count) { + if (localWeatherData != null && localWeatherData.getMinutely() != null + && localWeatherData.getMinutely().size() > count) { org.openhab.binding.openweathermap.internal.dto.onecall.Minutely forecastData = localWeatherData .getMinutely().get(count); State state = UnDefType.UNDEF; diff --git a/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/config/config.xml b/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/config/config.xml index ff6d7024c..116c16660 100644 --- a/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/config/config.xml +++ b/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/config/config.xml @@ -11,7 +11,7 @@ API key to access the OpenWeatherMap API. - + Specifies the refresh interval (in minutes). 60 diff --git a/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_de.properties b/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_de.properties index 551dcbbb2..78b315aa3 100644 --- a/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_de.properties +++ b/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_de.properties @@ -408,7 +408,7 @@ channel-type.openweathermap.alert-source.description = Zeigt die Quelle der Wett # thing status offline.conf-error-missing-apikey = Der Parameter 'API Schlüssel' muss konfiguriert werden. offline.conf-error-invalid-apikey = Ungültiger 'API Schlüssel'. Mehr Infos unter https://openweathermap.org/faq#error401. -offline.conf-error-not-supported-refreshInterval = Der Parameter 'Abfrageintervall' muss mindestens 10 min betragen. +offline.conf-error-not-supported-refreshInterval = Der Parameter 'Abfrageintervall' muss mindestens 1 min betragen. offline.conf-error-not-supported-language = Der angegebene Parameter 'Sprache' wird nicht unterstützt. offline.conf-error-missing-location = Der Parameter 'Ort' muss konfiguriert werden. diff --git a/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_fr.properties b/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_fr.properties index ac5ae4579..1ebe61246 100644 --- a/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_fr.properties +++ b/bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_fr.properties @@ -243,7 +243,7 @@ channel-type.openweathermap.forecasted-uvindex.description = L'indice UV prévu. # thing status offline.conf-error-missing-apikey = Le paramètre 'apikey' doit être configuré. offline.conf-error-invalid-apikey = Clé API invalide. Veuillez consulter https://openweathermap.org/faq#error401 pour plus d''informations. -offline.conf-error-not-supported-refreshInterval = Le paramètre 'refreshInterval' doit être au moins de 10 minutes. +offline.conf-error-not-supported-refreshInterval = Le paramètre 'refreshInterval' doit être au moins de 1 minute. offline.conf-error-not-supported-language = Le paramètre 'language' choisi n''est pas supporté. offline.conf-error-missing-location = Le paramètre 'location' doit être configuré.