I am building a display for the local weather and I had no problem displaying the information for todays weather. But I can’t figure out how to display a weather forecast for the next three days. It looks like recently a special object was added for this but I can’t access it.
This project seem to be able to do it but this code doesn’t work for me.
It says to use this code to create the forecast object. But I get errors when I put this in my configuration.yaml
Is there a simple way to get a weather forecast on ESPHome. Or good directions for a complex way?
Update:
I got it working.
I created an example file SDL-weather-forcast.yaml
# Weather packages
# Build icon set from .svg files
weather_icons_80: !include
file: modules/weather/weather_icons.yaml
vars:
size: 80
# Display weather forcast using icon set (defined above)
weather_forcast_80: !include
file: modules/weather/weather_forecast.yaml
vars:
size: 80
That part that took me the longest was using full color svg files for each weather icon. I now have a library that creates the icons with one line of code and another line to select the correct icon for the weather.
I hacked around for a few hours and I got it. Part of the problem was I was using Accuweather and they only give you 25 lookups per day for free. So I was not able to do more testing with them. I switched to National Weather service but they only give you twice daily weather reports not daily. What I ended up doing is a bit convoluted I take the high temps from the first part of the day and low temp from the second.
Looks a bit weird but it works. A simple 3 day forecast. Now I just need to get this into ESPHome but I think that will be easy now.
I figured Madeleine’s repro would have updated to the new format, but apparently it hasn’t. So spitting to a mile long thread was not what I had in mind when I redirected you (right before taking off to my dayjob). Next time I’ll be more specific, sorry for that. Glad you found my posts to highlight the changes needed.