mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[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:
parent
5c4b8f2769
commit
64801798d8
@ -85,9 +85,9 @@ public class OpenWeatherMapOneCallHandler extends AbstractOpenWeatherMapHandler
|
|||||||
private @Nullable OpenWeatherMapOneCallAPIData weatherData;
|
private @Nullable OpenWeatherMapOneCallAPIData weatherData;
|
||||||
|
|
||||||
// forecastMinutes, -Hours and -Days determine the number of channel groups to create for each type
|
// forecastMinutes, -Hours and -Days determine the number of channel groups to create for each type
|
||||||
private int forecastMinutes = 0;
|
private int forecastMinutes = 60;
|
||||||
private int forecastHours = 12;
|
private int forecastHours = 48;
|
||||||
private int forecastDays = 6;
|
private int forecastDays = 8;
|
||||||
private int numberOfAlerts = 0;
|
private int numberOfAlerts = 0;
|
||||||
|
|
||||||
public OpenWeatherMapOneCallHandler(Thing thing, final TimeZoneProvider timeZoneProvider) {
|
public OpenWeatherMapOneCallHandler(Thing thing, final TimeZoneProvider timeZoneProvider) {
|
||||||
|
@ -97,19 +97,6 @@
|
|||||||
</parameter>
|
</parameter>
|
||||||
</config-description>
|
</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">
|
<config-description uri="thing-type:openweathermap:air-pollution">
|
||||||
<parameter name="location" type="text" required="true">
|
<parameter name="location" type="text" required="true">
|
||||||
<context>location</context>
|
<context>location</context>
|
||||||
|
Loading…
Reference in New Issue
Block a user