updated yahoo weather thing type definition

- changed type of parameter location from text to integer
- added min attribute for refresh parameter

Signed-off-by: Thomas Höfer <t.hoefer@telekom.de>
This commit is contained in:
Thomas Höfer 2016-03-11 21:35:09 +01:00
Родитель 5ae012c245
Коммит dd0f652a77
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,3 @@
yahooweather:weather:berlin [ location="638242" ]
yahooweather:weather:losangeles "Los Angeles" [ location="2442047", unit="us", refresh=120 ]
yahooweather:weather:berlin [ location=638242 ]
yahooweather:weather:losangeles "Los Angeles" [ location=2442047, refresh=120 ]

Просмотреть файл

@ -16,13 +16,13 @@
</channels>
<config-description>
<parameter name="location" type="text" required="true">
<parameter name="location" type="integer" required="true">
<label>Location</label>
<description>Location for the weather information.
Syntax is WOEID, see https://en.wikipedia.org/wiki/WOEID.
</description>
</parameter>
<parameter name="refresh" type="integer">
<parameter name="refresh" type="integer" min="1">
<label>Refresh interval</label>
<description>Specifies the refresh interval in seconds.</description>
<default>60</default>

Просмотреть файл

@ -51,7 +51,7 @@ public class YahooWeatherHandler extends ConfigStatusThingHandler {
private final Logger logger = LoggerFactory.getLogger(YahooWeatherHandler.class);
private String location;
private BigDecimal location;
private BigDecimal refresh;
private String weatherData = null;
@ -69,7 +69,7 @@ public class YahooWeatherHandler extends ConfigStatusThingHandler {
Configuration config = getThing().getConfiguration();
location = (String) config.get("location");
location = (BigDecimal) config.get("location");
try {
refresh = (BigDecimal) config.get("refresh");