owmweather: Fix One Call API 3.0 does not return city name but it is required by weather app
parent
c38f113aa4
commit
7f5d375f29
|
|
@ -3,3 +3,4 @@
|
||||||
0.03: Fix updating weather too often
|
0.03: Fix updating weather too often
|
||||||
0.04: Minor code improvements
|
0.04: Minor code improvements
|
||||||
0.05: Upgrade OWM to One Call API 3.0. Add pressure to weather.json
|
0.05: Upgrade OWM to One Call API 3.0. Add pressure to weather.json
|
||||||
|
0.06: Fix One Call API 3.0 does not return city name but it is required by weather app
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ function parseWeather(response) {
|
||||||
weather.code = owmData.current.weather[0].id;
|
weather.code = owmData.current.weather[0].id;
|
||||||
weather.wdir = owmData.current.wind_deg;
|
weather.wdir = owmData.current.wind_deg;
|
||||||
weather.wind = owmData.current.wind_speed;
|
weather.wind = owmData.current.wind_speed;
|
||||||
// weather.loc = owmData.name;
|
weather.loc = owmData.name ? owmData.name : "";
|
||||||
weather.txt = owmData.current.weather[0].main;
|
weather.txt = owmData.current.weather[0].main;
|
||||||
weather.hpa = owmData.current.pressure ? owmData.current.pressure : 0;
|
weather.hpa = owmData.current.pressure ? owmData.current.pressure : 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ "id": "owmweather",
|
{ "id": "owmweather",
|
||||||
"name": "OpenWeatherMap weather provider",
|
"name": "OpenWeatherMap weather provider",
|
||||||
"shortName":"OWM Weather",
|
"shortName":"OWM Weather",
|
||||||
"version": "0.05",
|
"version": "0.06",
|
||||||
"description": "Pulls weather from OpenWeatherMap (OWM) API",
|
"description": "Pulls weather from OpenWeatherMap (OWM) API",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "bootloader",
|
"type": "bootloader",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue