A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Default Module: Weather Forecast
-
Why weather forecast won’t show
showRainAmount?
This is my config:
{ module: 'weatherforecast', position: 'top_right', header: 'Wettervorhersage', classes: 'small bright', // Add your own styling. Optional. config: { location: 'location', locationID: '121212121', //ID from http://www.openweathermap.org appid: 'xxxxxxxxxxxxxxxxxxxxx', maxNumberOfDays: 10, animationSpeed: 2000, fade: true, fadePoint: 0.25, appendLocationNameToHeader: true, showRainAmount: true, } },
Any ideas?
Edited By Moderator: App Id removed from the code snippet. Please try not to post your API tokens and secrets in a public forum. :bow:
-
Edit:
Oh, the developer branch has this option. If you are on the developer branch, then maybe there is no rain at that day/days?if (this.config.showRainAmount) { var rainCell = document.createElement("td"); if (isNaN(forecast.rain)) { rainCell.innerHTML = ""; } else { rainCell.innerHTML = forecast.rain + " mm"; } rainCell.className = "align-right bright rain"; row.appendChild(rainCell); }
-
Thank you, actually no developer branch installed.
-
-
@jakubc
You are right, the comma is redundant, but it doesn’t do any harm in this environment. In this case it did not work because lolobyte was running a MagicMirror version which did not have this feature. :)