Read the statement by Michael Teeuw here.
Location and temp problems with Weather
-
Hi all :)
I’ve just got everything set up in a virtual machine while I wait for my hardware to arrive, and I’m having some problems with the updated weather module.
I’ve got it running, and it looks good. I’ve got two copies, one displaying the current weather and one for the hourly forecast, and they’ve got the location above the modules. The problem is, the weather doesn’t match with the Open Weather Map website (showing approx 5c and cloudy, but 1c and clear on the website), and the location is displaying the latitude and longitude rather than the town name. My phone’s weather app uses Open Weather Map too, and it’s matching the site.
As far as I can see, everything is set up properly, including the /onecall endpoint for the hourly weather. The changes below are in weather.js with the two entries at the bottom in config.js
Can someone tell me what I’m missing please?
(P.S. I’m happy with the location being public, as it’s for the nearest town and doesn’t identify me)
weatherProvider: "openweathermap", roundTemp: false, type: "hourly", // current, forecast, daily (equivalent to forecast), hourly (only with OpenWeatherMap /onecall endpoint) lat: 51.7162, lon: 3.4518, location: 'Aberdare,GB', locationID: 2657835,
{ module: "weather", position: "top_right", config: { // See 'Configuration options' for more information. type: 'current' } }, { module: "weather", position: "top_right", config: { // See 'Configuration options' for more information. type: 'hourly' } },
-
In case anyone sees this in the future, I’ve solved it for me setup at least. I found that using locationID along with lat & long and location caused the problem. Changing to just locationID fixed it for me.
weatherProvider: "openweathermap", roundTemp: false, type: "forecast", // current, forecast, daily (equivalent to forecast), hourly (only with OpenWeatherMap /onecall endpoint) locationID: 2657835,
{ module: "weather", position: "top_right", config: { type: 'current' } }, { module: "weather", position: "top_right", config: { type: 'forecast' } },
Changing the second weather module to forecast instead of hourly was needed in config.js too.