[openweathermap] Finish clean-up & Fix OneCall Forecast Thing channel creation (#16416)

* [openweathermap] Clean-Up config.xml

Remove config description for removed UV Index Thing.

* [openweathermap] Fix OneCall Thing creates to many channels

The default setting is to create 0 minutes, 12 hours and 6 days of forecast channels.
When creating a new OneCall Thing, actually 60 minutes, 24 hours and 8 days of forecast were created due to the thing-types, but those not needed (as determined by the configuration) were not removed.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This commit is contained in:
Florian Hotze 2024-02-18 00:12:21 +01:00 committed by GitHub
parent 5c4b8f2769
commit 64801798d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 16 deletions

View File

@ -85,9 +85,9 @@ public class OpenWeatherMapOneCallHandler extends AbstractOpenWeatherMapHandler
private @Nullable OpenWeatherMapOneCallAPIData weatherData;
// forecastMinutes, -Hours and -Days determine the number of channel groups to create for each type
private int forecastMinutes = 0;
private int forecastHours = 12;
private int forecastDays = 6;
private int forecastMinutes = 60;
private int forecastHours = 48;
private int forecastDays = 8;
private int numberOfAlerts = 0;
public OpenWeatherMapOneCallHandler(Thing thing, final TimeZoneProvider timeZoneProvider) {

View File

@ -97,19 +97,6 @@
</parameter>
</config-description>
<config-description uri="thing-type:openweathermap:uvindex">
<parameter name="location" type="text" required="true">
<context>location</context>
<label>Location of Weather</label>
<description>Location of weather in geographical coordinates (latitude/longitude/altitude).</description>
</parameter>
<parameter name="forecastDays" type="integer" min="1" max="8" step="1">
<label>Number of Days</label>
<description>Number of days for UV Index forecast.</description>
<default>6</default>
</parameter>
</config-description>
<config-description uri="thing-type:openweathermap:air-pollution">
<parameter name="location" type="text" required="true">
<context>location</context>