willasm/obsidian-open-weather

%tempmin% and %tempmax% are always the same

kickTiger opened this issue · 3 comments

A small issue, the temperature values displayed on my end for Temperature Min %tempmin% and Temperature Max %tempmax% are always the same.

I think they might both be showing the highest temperature.
Other people I recommended have also encountered this situation.
I'm not sure if it's an issue with our settings here.

That is what is returned by the API unfortunately. Basically, it is the min/max temps over a short period of time not for the whole day. Here is a quote from their website..

Min/max temperature in current weather API and forecast API
Please, do not confuse min/max parameters in our weather APIs.

In Current weather API, Hourly forecast API and 5 day / 3 hour forecast API - temp_min and temp_max are optional parameters mean min / max temperature in the city at the current moment just for your reference. For large cities and megalopolises geographically expanded it might be applicable. In most cases both temp_min and temp_max parameters have the same volume as 'temp'. Please, use temp_min and temp_max parameters in current weather API optionally.

That means that most of the time, at least during the day, they will be identical or very close (within a half degree of each other) and with rounding they will always be the same. Here is a screenshot I took at 5:30 am. At this time of the day the temperature will be rising very quickly over the next couple of hours. As you can see they are different. Most of the time though they are identical though so I don't even bother using them. I will add an explanation for this behavior in the documentation as well.

minmax

Here is a sample taken over several hours...

minmax

As you can see it is consistently about 2 degrees apart. This is actually unusual from what I have seen in the past. Very early on I had the min/max temps in the status bar string by default but I removed them as they were the same 90% of the time. I have also checked a few other locations and I seem to be getting a small difference for most of them, anywhere from 0 to 5 degrees difference. From what I have gathered, the min/max will always be the same if the current temperature does not fluctuate over a 2 to 3 hour period which makes sense as they are based on the current conditions and not the entire day.

Thank you very much for your patient explanation,

I understand now. So I will not use this parameter for the time being.

Thanks again.