briis / smartweather

WeatherFlow Smart Weather Component for Home Assistant
MIT License
108 stars 11 forks source link

Feature Request: Today's forecast #67

Closed mwolter805 closed 3 years ago

mwolter805 commented 3 years ago

Hello, Thank you for your work on this great plugin. I use this along with your smartweatherudp plugin to retrieve weather data from a Tempest, both are solid. Might deactivate the udp one since it's duplicating much of the functionality. It's nice to see the realtime info but it's really not necessary.

Anyway, would like to see if it is possible to add today's forecast info to the daily forecast. It appears almost all of the info available at tempestwx.com is available through the plugin except this, and it might be the most important. Maybe it's already there and I'm missing it?

Great plugin, thank you for your time.

briis commented 3 years ago

You can extract todays forecast from the Weather entity, by looking at the forecast attribute. There you will see todays forecast as the first item in the array if you use daily mode. If you use hourly mode, it is a bit more complex. What data would you like to see in a daily forecast? I though I can create a sensor, where state is max temp for the day, and then some attributes with the other daily values?

mwolter805 commented 3 years ago

Hello briis, Thank you for the reply. Important info for Today's forecast would be the typical forecast data such as high and low temps and chance of precipitation.

Is it possible to add today's forecast to the existing weather entity as the first item in the forecast list? Would be good to have the data there as it can be viewed in the existing Lovelace weather cards and users should intuitively understand current weather data are the entity's main attributes and all forecast data (including today's) are in the forecast attribute.

Edit: Attached are screenshots of the weather entity and weather card displaying current data available. As you can see the first item in the list is tomorrow's forecast.

Screen Shot 2021-04-04 at 7 55 19 AM Screen Shot 2021-04-04 at 7 57 21 AM Screen Shot 2021-04-04 at 8 16 03 AM

briis commented 3 years ago

Turned out that this was actually a bug. Todays data should always have been there, but due to a bug in the IO module is was filtered out. I will try to fix this.

briis commented 3 years ago

Could you test a potential fix: Edit the file manifest.json in the custom_components/smartweather directory on you Home Assistant instance. Change this:

    "requirements": [
        "pysmartweatherio==2.1.7"
    ]

to this:

    "requirements": [
        "pysmartweatherio==2.1.8"
    ]

Restart Home Assistant and let me know if you get todays data as part of the Forecast Array. My own test shows that I can see the data in the developer tools, but in the Lovelace Weather card, it still shows tomorrows date as the first item.

mwolter805 commented 3 years ago

Great, thank you! I think everything is showing properly for me.

Screen Shot 2021-04-05 at 6 54 27 AM Screen Shot 2021-04-05 at 6 59 24 AM Screen Shot 2021-04-05 at 6 56 06 AM