smarthome
smarthome copied to clipboard
[owm] The (3) hourly forecasts contain temp_min and temp_max but channels only exist for daily forecasts
I am using the free API key from OWM and therefore don't get daily forecast values. According to the documentation the channels "min-temperature" and "max-temperature" are only available for daily forecasts.
But the JSON string returned from OWM contains a minimum and maximum temperature also for hourly forecasts (excerpt from the JSON string):
"main": {
"temp": 273.763,
"temp_min": 273.763,
"temp_max": 273.763,
"pressure": 1016.55,
"sea_level": 1043.89,
"grnd_level": 1016.55,
"humidity": 89,
"temp_kf": 0
},
This means the binding could provide these two channels for the hourly forecasts, too.
I decided to not use the minimum and maximum temperature values for the (3) hourly forecast because of the following statement in the documentation of the OWM API:
In most cases both temp_min and temp_max parameters have the same volume as 'temp'.
Of course it is possible to add them. Maybe as advanced channels.
I understand. I don't remember whether I have really seen different values. Advanced channels seems to be a good solution.
PR submitted https://github.com/openhab/openhab2-addons/pull/4741