Read the statement by Michael Teeuw here.
Weather Location / Calendar Format / Fast boot
-
@KirAsh4 thanks for your help!
I’ve tried to correct the weather location in the way you told me and yes, it has to be “Hamburg,DE”. But still there are some differences in the forecast and in the actual content on openweather.org. Maybe thats normal, I can live with that.
The language is already on “DE”, so “Today” has to be a term that isn’t “translatable”. But here has to be a way, to display the Dates in the Day/Month order or not?
I think I will do the connecting, which @paviro preffered.
-
Right, the wiki states that not all elements will be translated.
-
And I have also noticed some big discrepancies with OpenWeatherMap and my local weather. So you’re not alone there.
-
I modified the default module to look for a lat/long or a locationID before it uses the name you put in the config.js.
The location ID is specific and unambiguous so you shouldn’t get any location errors.If you want to modify your code to use a locationID (which you can get here) put this in weatherforecast.js
in your config.js in the weatherforecast config: { section add:
locationID: 'YOUR_LOCATION_ID',
under the “defaults” section add:
locationID: "",
change getParams: function()… to
getParams: function() { var params = "?"; if(this.config.locationID !== "") { params += "id=" + this.config.locationID; } else { params += "q=" + this.config.location; } params += "&units=" + this.config.units; params += "&lang=" + this.config.lang; params += "&cnt=" + (((this.config.maxNumberOfDays < 1) || (this.config.maxNumberOfDays > 16)) ? 7 : this.config.maxNumberOfDays); params += "&APPID=" + this.config.appid; return params; },
Moderator note: Please use proper markdown for easier reading.
-
@mochman Thanks for your help. I’ll try it, when I am working the next time on my Magic Mirror.