billykwooten / openweather-exporter

Prometheus exporter utilizing Openweather API (https://openweathermap.org/api) to gather weather metrics.
Apache License 2.0
57 stars 23 forks source link

More than one result per city #27

Closed xergio closed 1 year ago

xergio commented 2 years ago

Hi.

Is there any way to use the location ID instead the city code?

For example, if you look for my city "Alcalá de Henares" you get 2 results, corresponding with 2 locations inside the city. So, the exporter will get the result of one of this locations randomly, getting sometimes "spikes" of temperature because there can be more than 1 degree of difference between the two locations.

Can we use the numeric code instead the city name?

Thank you.

billykwooten commented 1 year ago

Hey Xergio, I couldn't replicate this issue, however I use a geo package in this and don't plan on modifying it. However, if this is still happening to you feel free to put in a PR.

I could not replicate this for US cities however.