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-OpenWeatherForecast deactivate Alerts or change to german

    Scheduled Pinned Locked Moved Utilities
    mmm-openweatherforecastweatheralertsdeactivate
    9 Posts 5 Posters 590 Views 5 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.
    • C Offline
      chichi1887
      last edited by

      I am using the MMM-OpenWeatherForecast module for MagicMirror and would like to either disable the alerts or set them to German. I have tried many different configurations but cannot figure out how to resolve this issue. Here is my current configuration:

      module: "MMM-OpenWeatherForecast",
      position: "top_right",
      header: "Wetter",
      config: {
          apiBaseURL: "https://api.openweathermap.org/data/3.0/onecall?",
          apikey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 
          latitude: "XX.XXX", 
          longitude: "XX.XXX", 
          units: "metric",
          language: "de",
          iconset: "5c",
          showAlerts: false,
          colored: true,
          concise: true,
          requestDelay: 2000,
          showFeelsLikeTemp: false,
          displayKmhForWind: true,
          label_hourlyTimeFormat: "k:mm[h]",
          forecastLayout: "tiled",
          maxHourliesToShow: "6",
          hourlyForecastInterval: "2",
          maxDailiesToShow: "3",
          label_sunriseTimeFormat: "k:mm[h]",
          showCurrentConditions: true,           // Show current conditions
          showSummary: true,                     // Show summary
          showExtraCurrentConditions: true,      // Show extra current conditions
          extraCurrentConditions: {
              highLowTemp: true,                 // High/Low temperature
              precipitation: true,               // Precipitation
              sunrise: true,                     // Sunrise
              sunset: true,                      // Sunset
              wind: true,                        // Wind
              barometricPressure: false,         // Barometric pressure
              humidity: true,                    // Humidity
              dewPoint: false,                   // Dew point
              uvIndex: false,                    // UV index
              visibility: false                  // Visibility
          }
      }
      
      

      weatheralerts.JPG

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

        @chichi1887 don’t know which version of the module you are using, but the one from Tom

        shows in the njk (display template)

            {% if config.showSummary %}
              <div class="summary-wrapper small">
                <div class="summary">{{ forecast.summary }}</div>
        
                {% for alert in forecast.alerts %}
                  <div class="weather-alert">
                    <span class="weather-alert-title">{{ alert.event }}</span>
                    <span class="weather-alert-description">{{ alert.description }}</span>
                    <span class="weather-alert-source">{{ alert.sender_name }}</span>
                  </div>
                {% endfor %}
              </div>
            {% endif %}
        

        so if showSummary is true, the alerts could be shown… AFTER the forecast.summary
        if you don’t need/want the forecast summary , set showSummary:false,

        if you DO want the summary, but not the notices, then you will have to use css (in css/custom.css add)

        .MMM-OpenWeatherForecast  .weather-alert { 
             display:none;
        }
        

        I think this data comes back from OpenWeather in english
        regardless of the language set in the api request

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C C 2 Replies Last reply Reply Quote 1
        • C Offline
          chichi1887 @sdetweil
          last edited by

          @sdetweil T
          Thank u so much. It woks perfect. Have a Great weekend

          1 Reply Last reply Reply Quote 0
          • S sdetweil referenced this topic on
          • C Offline
            com1cedric @sdetweil
            last edited by

            @sdetweil

            Dear Sam, are you sur that the language is really checked by this module when asking open weather?

            If yes, I will ask openweather directly.

            With this example on Google, the messages are shown in the correct language (in this case FR), so that the provider (meteoswiss) publishes it in FR.

            Screenshot_20250108-184305.png

            But on the mirror with this module, it still only appears in EN.

            Capture d’écran 2025-01-08 à 19.05.53.jpg

            Thanks for your good advise and have a good evening.!

            Cédric

            C S 2 Replies Last reply Reply Quote 0
            • C Offline
              com1cedric @com1cedric
              last edited by

              @com1cedric

              Here the confirmation from openweather:

              Capture d’écran 2025-01-08 à 19.10.53.jpg

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

                @com1cedric < MMM-OpenWeatherForecast you will have to ask the author via on issue on the module github page

                the default weather module ~/MagicMirror/modules/default/weather
                module:“weather”

                is the one I know about (but still have to depend on others to fix)

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  com1cedric @sdetweil
                  last edited by

                  @sdetweil ok, thanks !

                  wishmaster270W 1 Reply Last reply Reply Quote 0
                  • wishmaster270W Offline
                    wishmaster270 Module Developer @com1cedric
                    last edited by

                    @com1cedric

                    Hi,

                    as I wrote in the issue you opened the module also calls the api with the correct language settings.
                    I the description of the language setting of OpenWeather there is a hint that some alert providers do not provide translations.

                    1 Reply Last reply Reply Quote 0
                    • I Offline
                      itsmemario1
                      last edited by

                      @sdetweil said in MMM-OpenWeatherForecast deactivate Alerts or change to german:

                      MMM-OpenWeatherForecast

                      Can you tell me which MMM-OpenWeatherForecast you are currently using, I can’t get mines to work for months.

                      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