MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.25.0 is available! For more information about this release, check out this topic.

    Default Module: Weather Forecast

    Troubleshooting
    3
    5
    2734
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lolobyte
      lolobyte last edited by morozgrafix

      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. 🙇

      J 1 Reply Last reply Reply Quote 0
      • yawns
        yawns Moderator last edited by yawns

        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);
        			}
        
        lolobyte 1 Reply Last reply Reply Quote 1
        • lolobyte
          lolobyte @yawns last edited by

          @yawns

          Thank you, actually no developer branch installed.

          1 Reply Last reply Reply Quote 0
          • J
            jakubc @lolobyte last edited by

            @lolobyte after

            showRainAmount: true
            

            remove comma

            yawns 1 Reply Last reply Reply Quote 0
            • yawns
              yawns Moderator @jakubc last edited by

              @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. 🙂

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy