• 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.

MMM-OpenWeatherForecast deactivate Alerts or change to german

Scheduled Pinned Locked Moved Utilities
mmm-openweatherforecastweatheralertsdeactivate
9 Posts 5 Posters 579 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 Jan 4, 2025, 1:46 PM

    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 Jan 4, 2025, 1:58 PM Reply Quote 0
    • S Offline
      sdetweil @chichi1887
      last edited by sdetweil Jan 4, 2025, 1:58 PM Jan 4, 2025, 1:58 PM

      @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 Jan 4, 2025, 2:06 PM Reply Quote 1
      • C Offline
        chichi1887 @sdetweil
        last edited by Jan 4, 2025, 2:06 PM

        @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 Jan 5, 2025, 11:35 AM
        • C Offline
          com1cedric @sdetweil
          last edited by Jan 8, 2025, 6:07 PM

          @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 Jan 8, 2025, 6:12 PM Reply Quote 0
          • C Offline
            com1cedric @com1cedric
            last edited by Jan 8, 2025, 6:12 PM

            @com1cedric

            Here the confirmation from openweather:

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

            1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @com1cedric
              last edited by Jan 8, 2025, 6:12 PM

              @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 Jan 8, 2025, 6:19 PM Reply Quote 0
              • C Offline
                com1cedric @sdetweil
                last edited by Jan 8, 2025, 6:19 PM

                @sdetweil ok, thanks !

                W 1 Reply Last reply Jan 8, 2025, 7:41 PM Reply Quote 0
                • W Offline
                  wishmaster270 Module Developer @com1cedric
                  last edited by Jan 8, 2025, 7:41 PM

                  @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 Jan 10, 2025, 1:48 AM

                    @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
                    1 / 1
                    • First post
                      2/9
                      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