MagicMirror Forum

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

    MMM-OpenWeatherMapForecast Doesn't display imperial units

    Troubleshooting
    4
    9
    434
    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.
    • R
      rslohs last edited by

      Hello,

      Working on OpenWeatherMapForecast and so far have really liked it. One issue, for predicted precipitation I cannot get imperial units to show. I’ve tried changing it within config.js as well as the config file in the module as well. Any suggestions?

      {
      module: “MMM-OpenWeatherMapForecast”,
      header: “Weather”,
      position: “bottom_right”,
      classes: “default everyone”,
      disabled: false,
      config: {
      apikey: “KEY”,
      latitude: “444444”,
      longitude: “-4444444”,
      iconset: “4c”,
      concise: false,
      forecastLayout: “table”,
      units: “imperial”,
      }
      },

      S Mykle1 2 Replies Last reply Reply Quote 0
      • S
        sdetweil @rslohs last edited by

        @rslohs the doc says the module config options is units

        from
        https://github.com/jharttech/MMM-weatherforecast

        Screenshot_20210218-191525_Chrome.jpg

        Sam

        Create a working config
        How to add modules

        R 1 Reply Last reply Reply Quote 0
        • R
          rslohs @sdetweil last edited by

          @sdetweil I’m not quite sure what you’re saying. The ‘Units:“imperial”,’ is incorrect in the code I shared? What should I try differently?

          S 1 Reply Last reply Reply Quote 0
          • Mykle1
            Mykle1 Project Sponsor Module Developer @rslohs last edited by

            @rslohs

            Just a thought: At the top of your config.js file, what are your config units set to?

            Example:

            var config = {
                address: "0.0.0.0",
                port: 8080,
                ipWhitelist: [], // Set [] to allow all IP addresses
                language: "en",
                timeFormat: 12,
                units: "imperial",
            

            Create a working config
            How to add modules

            R 1 Reply Last reply Reply Quote 0
            • R
              rslohs @Mykle1 last edited by

              @mykle1 thanks for the suggestion, but that is set to imperial as well.

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

                @rslohs its not “Units”, its “units”

                this system is case sensitive, every letter matters

                Sam

                Create a working config
                How to add modules

                R 1 Reply Last reply Reply Quote 0
                • R
                  rslohs @sdetweil last edited by sdetweil

                  @sdetweil that’s what I’m using in the config file.

                  {
                  module: "MMM-OpenWeatherMapForecast",
                  header: "Schoolcraft, MI Weather",
                  position: "top_right",
                  classes: "default everyone",
                  disabled: false,
                  config: {
                  apikey: "aaaaaaaa",
                  latitude: "aaaaaaa",
                  longitude: "aaaaaa",
                  iconset: "4c",
                  concise: false,
                  forecastLayout: "table",
                  units: "imperial",
                  }
                  },
                  
                  S 1 Reply Last reply Reply Quote 0
                  • S
                    scumbelly @rslohs last edited by

                    @rslohs

                    A little late to weigh in but I can verify that imperial setting does not affect the Pop amount. It remains metric. Everything else is imperial.

                    Sorry.

                    1 Reply Last reply Reply Quote 0
                    • S
                      scumbelly @rslohs last edited by

                      @rslohs

                      Guess what? I was trying to troubleshoot an issue in this module re: scale and noticed the .js file has changed wind calculations and the following…

                      units: {
                      accumulationRain: {
                      imperial: “mm”,
                      metric: “mm”,
                      “”: “mm”
                      },
                      accumulationSnow: {
                      imperial: “mm”,
                      metric: “mm”,
                      “”: “mm”
                      },
                      windSpeed: {
                      imperial: “mph”,
                      metric: “m/s”,
                      “”: “m/s”
                      }
                      },

                      So it looks like imperial might work for you now. I’m not going to test because I need the older .js which I had to modify to get some calculations in kph to work .

                      Cheers

                      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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy