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.

    MMM-WeatherOrNot - Forecast

    Scheduled Pinned Locked Moved System
    7 Posts 3 Posters 1.8k 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.
    • B Offline
      bjoern
      last edited by

      Re: MMM-WeatherOrNot
      It’s possible to activate/deactivate the current weather e.g.

      currentWeather: "true"/"false" ?
      
      lavolp3L 1 Reply Last reply Reply Quote 0
      • lavolp3L Offline
        lavolp3 Module Developer @bjoern
        last edited by

        @bjoern If there’s nothing in the README about that, you can try to find out the elements id or class and give it display: none in your custom.css

        .MMM-WeatherOrNot .someElement {
          display: none;
        }
        

        How to troubleshoot modules
        MMM-soccer v2, MMM-AVStock

        1 Reply Last reply Reply Quote 0
        • B Offline
          bjoern
          last edited by

          @lavolp3 said in MMM-WeatherOrNot - Forecast:

          .MMM-WeatherOrNot .someElement {
          display: none;
          }

          Thanks a lot, but it does not work.

          .MMM-WeatherOrNot .currentWeather {
            display: none;
          }
          

          i don’t know why. it’s the corect element, in my opinion

          lavolp3L 1 Reply Last reply Reply Quote 0
          • lavolp3L Offline
            lavolp3 Module Developer @bjoern
            last edited by

            @bjoern said in MMM-WeatherOrNot - Forecast:

            @lavolp3 said in MMM-WeatherOrNot - Forecast:

            .MMM-WeatherOrNot .someElement {
            display: none;
            }

            Thanks a lot, but it does not work.

            .MMM-WeatherOrNot .currentWeather {
              display: none;
            }
            

            i don’t know why. it’s the corect element, in my opinion

            I agree, the element selector is the right one.
            It sits in an iframe, that may be the reason.
            I don’t know how to get to the css inside the iframe.

            How to troubleshoot modules
            MMM-soccer v2, MMM-AVStock

            1 Reply Last reply Reply Quote 0
            • R Offline
              raymondjspigot
              last edited by

              Hi @bjoern - so I think this should be possible (although there doesn’t seem to be a way to configure it in the module’s config.js entry just now)

              The MMM-WeatherOrNot readme says that the information it displays is pulled from https://weatherwidget.io/. If you go there and try adjusting the sample widget shown on the site, there’s an option for Current / Forecast, which you can set to Current, Forecast or Both. It looks like it defaults to Both, which I guess is what you’re seeing.

              By trying the different options and clicking on the GET CODE button, I get a code block including either

              data-mode="Forecast"

              data-mode="Current"

              or a block with no data-mode in at all, if I select Both.

              If you look in the MMM-WeatherOrNot.js file you can see at the bottom where this codeblock to pull the correctly-configured information is sort of constructed, based on the values you’ve given in your config.js.

              So it looks like you could theoretically:

              • add a new parameter to your config.js, e.g.
              {
                  disabled: false,
                  module: 'MMM-WeatherOrNot',
                  position: 'middle center',
                  config: {
                    location: "staten-island",
                    dataMode: "Forecast",   // valid options are "Both", "Forecast" or "Current"
              
              • update MMM-WeatherOrNot.js to refer to the parameter - where it shows
              / Insert config options
              		iframe.srcdoc = `&lta class="weatherwidget-io"
              

              you could maybe include data-mode="${this.config.dataMode}"

              Something like that anyway. And then it might allow you to control whether the Current weather is shown or just the Forecast using the config.

              lavolp3L 1 Reply Last reply Reply Quote 1
              • lavolp3L Offline
                lavolp3 Module Developer @raymondjspigot
                last edited by

                @raymondjspigot Great idea! You should create a PR from that! Look here @Mykle1

                How to troubleshoot modules
                MMM-soccer v2, MMM-AVStock

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bjoern
                  last edited by

                  @raymondjspigot : thanks a lot. that it’s. works fine!

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 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