• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.0k 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.
  • L Offline
    lolobyte
    last edited by morozgrafix Jan 25, 2017, 11:02 AM Dec 28, 2016, 4:24 PM

    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 Jan 25, 2017, 5:45 AM Reply Quote 0
    • Y Offline
      yawns Moderator
      last edited by yawns Dec 28, 2016, 4:47 PM Dec 28, 2016, 4:40 PM

      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);
      			}
      
      L 1 Reply Last reply Dec 28, 2016, 7:01 PM Reply Quote 1
      • L Offline
        lolobyte @yawns
        last edited by Dec 28, 2016, 7:01 PM

        @yawns

        Thank you, actually no developer branch installed.

        1 Reply Last reply Reply Quote 0
        • J Offline
          jakubc @lolobyte
          last edited by Jan 25, 2017, 5:45 AM

          @lolobyte after

          showRainAmount: true
          

          remove comma

          Y 1 Reply Last reply Jan 25, 2017, 8:09 AM Reply Quote 0
          • Y Offline
            yawns Moderator @jakubc
            last edited by Jan 25, 2017, 8:09 AM

            @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