Pimatic Plugin that retrieves the current weather and forecast data on several devices. Important notes:
cityId
property has been added
which allows for setting the location id to work-around the problemblacklist
property has been added to OpenWeatherDevice
which allows for defining a list
of weather results to ignore as they contain false dataday
property default value of the OpenWeatherForecastDevice
has been changed to 2
to obtain the forecast
for the next day by default. The property denotes the forecast day starting from 1 to 16 where 1 means today.Add the plugin to the plugin section:
{
"plugin": "openweather",
"apiKey": "xxxxxxxxxxxxx",
"debug": false
}
Then add the device with the location into the devices section:
{
"id": "weather",
"class": "OpenWeatherDevice",
"name": "Weather Geneva",
"location": "Geneva, CH",
"units": "metric",
"lang": "en",
"timeout": 900000
}
If you need a forecast you can use the following device:
{
"id": "forecast",
"class": "OpenWeatherForecastDevice",
"name": "Forecast 1 day for Geneva",
"location": "Geneva, CH",
"units": "metric",
"lang": "en",
"timeout": 900000,
"day": 2
}
Then you can add the items into the mobile frontend.
Attributes can be hidden from the display in the mobile frontend by using the xattributeOptions
property as shown in the example below.
{
"id": "weather",
"class": "OpenWeatherDevice",
"name": "Today",
"location": "Geneva, CH",
"units": "metric",
"timeout": 900000,
"lang": "en",
"xAttributeOptions": [
{
"name": "humidity",
"hidden": true
},
{
"name": "pressure",
"hidden": true
}
]
}
Unfortunately, some weather stations emit false weather data. As a result for some locations false data is returned at times. The idea of blacklisting is to filter out such outlier results. A blacklist entry may consist of up to three of the following properties.
Most Attributes like temperature, wind or rain are self-explanatory. In addition to the status there are two more attributes provided by the openweatermap-api:
All provided categories, status and ids are listed here: https://openweathermap.org/weather-conditions