lmarzen / esp32-weather-epd

A low-power E-Paper weather display powered by an ESP32 microcontroller. Utilizes the OpenWeatherMap API.
GNU General Public License v3.0
2.49k stars 196 forks source link

Put the low before the high. #100

Closed kbloom closed 4 months ago

kbloom commented 4 months ago

It appears that when the OpenWeatherMap API returns its low temperature and high temperature for the day, that the low means that it's the lowest temperature expected in the 24 hour period that runs from midnight to midnight. That means that typically the low for Monday is the temperature on Monday at about 6 AM before the sun rises, and this low temperature comes before the high, which happens in the afternoon after the sun has been out all day. However, this display currently displays the low after the high, meaning that in the typical case, the low and high are not in chronological order.

By reversing the order, the high and low will more frequently be in chronological order, paralleling the way that most other weather forecasts report highs and lows.

Note: if tomorrow is forcasted to be much colder than today, and the weather pattern is going to dramatically cool off in the afternoon or overnight, then sometimes the low temperature returned by OpenWeatherMap will actually be at midnight at the end of the day. Hence, this new solution is only mostly chronological, but it should be chronological more often that the current way.

lmarzen commented 4 months ago

While I understand the intention behind the proposed change, I do not think we should change displaying "hi/lo" to "lo/hi"

The convention of displaying temperatures as "hi/lo" is deeply ingrained in weather reporting and forecasting, and I challenge you to find a widely used weather service that reports in a "lo/hi" format.

I think the real issue is how the hi/lo is calculated. Historical data generally uses midnight to midnight max/min, while most modern weather services report day-time high/overnight low in their forecasts.