MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Default Module: Weather Forecast

    Scheduled Pinned Locked Moved Troubleshooting
    5 Posts 3 Posters 3.1k Views 3 Watching
    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.
    • lolobyteL Offline
      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. :bow:

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

          @yawns

          Thank you, actually no developer branch installed.

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

            @lolobyte after

            showRainAmount: true
            

            remove comma

            yawnsY 1 Reply Last reply Reply Quote 0
            • yawnsY Offline
              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 Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy