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.

    Precipitation Probability not displayed when it is 0%

    Scheduled Pinned Locked Moved Bug Hunt
    5 Posts 2 Posters 525 Views 2 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.
    • P Offline
      pencilsharpener
      last edited by

      OS: Ubuntu 22.04.3 LTS
      Node: v21.5.0
      MagicMirror Version: 2.26.0

      In the hourly weather display, when the the Precipitation Probability is 0 the table cell is blank/empty. For consistency I would expect it to display “0%”

      Steps to Reproduce:
      I am using the WeatherGov module, but I believe this would be reproducible on any module that uses the weather.js library. To reproduce display the precipitation probability in the hourly weather module and have a dry time period where the precipitation probably is returned as 0%.

      Expected Results: To be consistent in the hourly chart, I would expect the table cell to be populated with 0% instead of blank. That gives confidence that data is being returned instead of it being an unknown (i.e. is it zero or is it missing data).

      Additional Notes:
      I think the problem is with modules\default\weather\weather.js line 238.
      If the type is “precip” and the value is 0 or the formated value is “0.00”, then a blank value is returned.
      I don’t believe the zero check to be valid for the Precipitation Probability data and instead would send zero values to the WeatherUtils.convertPrecipitationUnit function. There does not appear to be anything in that function that cannot handle a zero value so it should not cause other problems. Null values should continue to return a blank/empty value as they do now.

      S 1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @pencilsharpener
        last edited by sdetweil

        @pencilsharpener open an issue on the mm GitHub page.

        better yet, after opening the issue

        fork the repo, create the fix and submit a PR for the team to look at and take

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        P 2 Replies Last reply Reply Quote 0
        • P Offline
          pencilsharpener @sdetweil
          last edited by

          @sdetweil
          I had the issue open, saw it was directing people here for confirmation of bugs and figured I would start here.

          I’ve already forked the repo to keep a few other local changes so I should be able to submit a pull request. Just need to refresh myself on how to do that correctly and the project’s submission rules to make sure it is a good request.

          1 Reply Last reply Reply Quote 0
          • P Offline
            pencilsharpener @sdetweil
            last edited by

            @sdetweil

            The pull request message suggested posting here if not sure that it was truly a bug. I figured a second set of eyes to validate that this should be displayed was a good idea so I posted here first.

            Issue and pull request have been created.

            https://github.com/MagicMirrorOrg/MagicMirror/pull/3346

            S 1 Reply Last reply Reply Quote 0
            • S Away
              sdetweil @pencilsharpener
              last edited by

              @pencilsharpener I saw. thank you

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 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