Read the statement by Michael Teeuw here.
MMM-OpenWeatherForecast deactivate Alerts or change to german
-
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 } }
-
@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 -
@sdetweil T
Thank u so much. It woks perfect. Have a Great weekend -
-
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.
But on the mirror with this module, it still only appears in EN.
Thanks for your good advise and have a good evening.!
Cédric
-
Here the confirmation from openweather:
-
@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)
-
@sdetweil ok, thanks !
-
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.