magic21nrw / MMM-COVID19-AMPEL

This is a COVID-19 Information Extension Module for the Magic Mirror. It shows the City of your choice with the 7 day incidence value per 100k people. In Germany this is used to control the degree of lockdown activities.
https://magicmirror.builders
MIT License
12 stars 2 forks source link

Sorting by location / object ID #10

Closed ThomasH-W closed 3 years ago

ThomasH-W commented 3 years ago

Hello, First of all many thanks for the module - it is exactly what I was looking for.

When selecting multiple locations in the confg file, it looks like that order is being determined by the absolute number of infections and the order of cityID's in the config file being ignored. Would be nice if you could add an option to use the order in the config file.

Kind Regards Thomas

magic21nrw commented 3 years ago

To be honest, I am not 100% sure on how I can do that (only a noob programmer ;) ) to map the order of my config to the order of my array. What I could do is to sort it alphabetically which could be done with one line of extra code. Would that help to order multiple locations in a meaningful way?

Please check the new version and let me know if this is okay...

ThomasH-W commented 3 years ago

This update works for me as the main objectiv was to prevent a different order of city names each time. Thank your.