I have been working on this for weeks now, and am no closer to having it done. Does anyone have working weather forecast code that works with today’s ESPHome and HA?
I’m trying to build a weather forecast display. I’ll worry about how to display it… I am currently stuck trying to get the data.
There are countless people who put some YAML code somewhere in HA that then creates variables in HA that ESPHome then reads. I have never gotten any of these to work, so either I am doing it incorrectly, or those methods are no longer supported.
I am able to manually create states in HA and then read those in ESPHome. What I want to do is have a state dynamically generated that I can read in ESPHome.
I have tried reading HA and ESPHome documentation, but it is extremely difficult to read because it assumes a lot of knowledge that I don’t have yet. And, the documentation uses a lot of ellipses, and I don’t know what they’re skipping, and I don’t understand how to take the information given and build a solution from it. A “Hello World” type example would go a long way here.
Does anyone have a “Hello world” program here?
To be clear: I can take individual variables out of the weather data – I can get the current conditions, no problem. I am trying to get forecast data, but there does not seem to be a way to process the forecast array in ESPHome, so it has to be processed in HA and then sent to ESPHome via a text string or other variable(s). This is the part that I cannot get working.
In that thread, user tom_l presents a solution that would work, but gives no details about it. Anybody know how to do what he is saying? I mean: How do I split it up in ESPHome?
I added the sensor code to my /homeassistant/configuration.yaml file, but whenever I do this, I was getting an error that sensor was not supported. I just retried it, and now I don’t get an error, but I also don’t get any value in sensor.weather_fivedays.
The answer is in the code for the weatherman display I linked you to a few posts higher sensor. It uses a time based trigger. The top part looks like this: