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:


  • Moderator

    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);
    			}
    


  • @yawns

    Thank you, actually no developer branch installed.



  • @lolobyte after

    showRainAmount: true
    

    remove comma


  • Moderator

    @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. :)


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.