Read the statement by Michael Teeuw here.
How to Change MMM-DWD-WarnWeather Module for Switzerland
-
@Squirrel you are pushing every single propertie to the array instead of the whole object
if (result['alarms'][regionId]['regions'][0]['name_de'] == region) { var warnings = {}; warnings.start = result['alarms'][regionId]['valid_from']; warnings.end = result['alarms'][regionId]['valid_to']; warnings.regionName = result['alarms'][regionId]['regions'][0]['name_de']; warnings.level = result['alarms'][regionId]['priority'] warnings.type = result['alarms'][regionId]['code'] warnings.altitudeStart = undefined; if (warnings.type == 1){warnings.event = "Frost";} else if (warnings.type == 2){warnings.event = "Gewitter";} else if (warnings.type == 3){warnings.event = "Grossflächige Glätte";} else if (warnings.type == 4){warnings.event = "Kräftiger Regen";} else if (warnings.type == 5){warnings.event = "Schnee";} else if (warnings.type == 6){warnings.event = "Sturm";} else if (warnings.type == 7){warnings.event = "Hochwasser";} warnings.headline = result['alarms'][regionId]['de']['title']; warnings.description = result['alarms'][regionId]['de']['paragraph']; warningData.push(warnings); }
try this instead
-
Thanks again for fast Answer! Now everything is working. Im so happy! :)
I have just one last Question. I tried to run both modules at the same time. This is giving me problems. The Icons are too much big and i cant see something else…
I changed all the names of the module files and folders and i have no idea where i can find this fault. I think nobody gonna us this two modules at the same time but i want to upload my module for other users and if somebody is using both of them i dont want to destroy @LukeCodewalker s module… ;)
-
I uploaded my Project MMM-WetteralarmCH now! If somebody can help me with the problem of using both modules (MMM-WetteralarmCH and. MMM-DWD-WarnWeather) at the same time i gonna update my Project again.
Thanks to everybody for helping me!
-
Sorry for being absent so long. Busy times in the moment :) but I’m glad to see that you’ve got it working. :thumbsup:
-
@LukeCodewalker thanks! But I still need a Solution to don’t Crash your Module while both modules are running at the same time… Let me know when you have more time to talk about that topic 😉