smarthome icon indicating copy to clipboard operation
smarthome copied to clipboard

[owm] The (3) hourly forecasts contain temp_min and temp_max but channels only exist for daily forecasts

Open MHerbst opened this issue 5 years ago • 3 comments

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.

MHerbst avatar Dec 26 '18 20:12 MHerbst

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.

cweitkamp avatar Dec 28 '18 22:12 cweitkamp

I understand. I don't remember whether I have really seen different values. Advanced channels seems to be a good solution.

MHerbst avatar Dec 29 '18 08:12 MHerbst

PR submitted https://github.com/openhab/openhab2-addons/pull/4741

cweitkamp avatar Jan 28 '19 15:01 cweitkamp