Homey Community Forum

Openweather api

Trying to get the openweather api json files in variables.

This is the file:
{“lat”:53.05,“lon”:5.67,“timezone”:“Europe/Amsterdam”,“timezone_offset”:7200,“hourly”:[{“dt”:1591351200,“temp”:10.2,“feels_like”:6.25,“pressure”:989,“humidity”:90,“dew_point”:8.63,“clouds”:100,“wind_speed”:5.2,“wind_deg”:188,“weather”:[{“id”:501,“main”:“Rain”,“description”:“matige regen”,“icon”:“10d”}],“rain”:{“1h”:1.62}},{“dt”:1591354800,“temp”:10.34,“feels_like”:6.89,“pressure”:989,“humidity”:88,“dew_point”:8.44,“clouds”:100,“wind_speed”:4.42,“wind_deg”:208,“weather”:[{“id”:500,“main”:“Rain”,“description”:“lichte regen”,“icon”:“10d”}],“rain”:{“1h”:0.88}},{“dt”:1591358400,“temp”:11.45,“feels_like”:7.88,“pressure”:989,“humidity”:82,“dew_point”:8.49,“clouds”:100,“wind_speed”:4.61,“wind_deg”:222,“weather”:[{“id”:500,“main”:“Rain”,“description”:“lichte regen”,“icon”:“10d”}],“rain”:{“1h”:0.81}},{“dt”:1591362000,“temp”:12.31,“feels_like”:9.16,“pressure”:989,“humidity”:79,“dew_point”:8.78,“clouds”:100,“wind_speed”:4.1,“wind_deg”:242,“weather”:

This is what i tried. Any ideas for the right formula?

$.hourly[0].temp (for the first hourly temperature, increase 0 for each one after that)

2 Likes

Robert you are fantastic. Everytime right on the spot. I can’t read json myself, each time trying, this time already for four hours long!.

It works