iprak / weatherapi

HomeAssistant custom integration to fetch data from weatherapi
MIT License
8 stars 3 forks source link

How to change to hourly? #5

Closed jds11111 closed 2 years ago

jds11111 commented 2 years ago

I have installed the integration using HACS, and there is now a weather.weatherapi_home entity. However, it is just a daily forecast, and not hourly. Is there a way to add the hourly forecast?

iprak commented 2 years ago

Sorry, currently there is no support for hourly forecast. I can look into it but not sure when.

iprak commented 2 years ago

Actually I am not seeing hourly data being returned from weatherapi end point. Can you give is a try here ?

jds11111 commented 2 years ago

Yes, I do get hourly data:

                   {
                        "time_epoch": 1637744400,
                        "time": "2021-11-24 03:00",
                        "temp_c": 4.9,
                        "temp_f": 40.8,
                        "is_day": 0,
                        "condition": {
                            "text": "Clear",
                            "icon": "//cdn.weatherapi.com/weather/64x64/night/113.png",
                            "code": 1000
                        },
                        "wind_mph": 19.0,
                        "wind_kph": 30.6,
                        "wind_degree": 196,
                        "wind_dir": "SSW",
                        "pressure_mb": 1016.0,
                        "pressure_in": 30.0,
                        "precip_mm": 0.0,
                        "precip_in": 0.0,
                        "humidity": 53,
                        "cloud": 3,
                        "feelslike_c": -0.1,
                        "feelslike_f": 31.8,
                        "windchill_c": -0.1,
                        "windchill_f": 31.8,
                        "heatindex_c": 4.9,
                        "heatindex_f": 40.8,
                        "dewpoint_c": -3.7,
                        "dewpoint_f": 25.3,
                        "will_it_rain": 0,
                        "chance_of_rain": 0,
                        "will_it_snow": 0,
                        "chance_of_snow": 0,
                        "vis_km": 10.0,
                        "vis_miles": 6.0,
                        "gust_mph": 27.7,
                        "gust_kph": 44.6,
                        "uv": 1.0
                    },
                    {
                        "time_epoch": 1637748000,
                        "time": "2021-11-24 04:00",
                        "temp_c": 4.9,
iprak commented 2 years ago

This has been addressed in #7

jds11111 commented 2 years ago

When I try to add the integration, I get an error message that the config flow could not be loaded image

iprak commented 2 years ago

I pushed out a fix, sorry about that.

jds11111 commented 2 years ago

Now it works like a charm. Many thanks!