Hi, I use this template too and I don’t have this error. But with the new version of the weather.get_forecasts service (with an s) it no longer works because there is a header that is added to the result. Does anyone know how to solve this problem?
The new service call lets you get the forecast from multiple weather entities. The response_variable’s structure is slightly different so you have to specify which entity’s forecast you want (even if you only asked for the forecast from one weather entity).
The deprecation caused me a bit of grief too. I was using it, among other things, to identify “bad weather” in 24h forecast and store that in template “safety” binary sensors, which I would then use to notify me. But since you can’t use forecast attribute in templates anymore (post-deprecation)…
I devised a new method. State/attribute changes on weather entity will run get_forecasts, identify the same as before, and notify me if needed; no more template sensors, everything’s in one automation. Be sure to change the timedelta in the last_triggered condition to whatever you want, if you reuse this automation.
Does anyone know what the best practice is here to round the temperature values?
As we can’t use forecast attribute in templates anymore from March.
Thank you!
I recently made a change from using “forecast” to “forecasts” in my configuration, following the suggestions from Taras and ValMarDav also adding ‘weather.forecast_home’ to the attribute definition. However, it seems like the sensor broke again, and I’m encountering an error stating that “hourly” is not defined.
Hi, thank you for tying it out. I restarted Homeassistant a couple times and now it somehow works. I did not change anything, but now the response variable is recognized. No idea, why it works now, but it works :-). Thank you for your support.
One possible thing to look at, is whether your weather integration has been updated to support the new methods for getting forecast data.
One quick way to check is to goto UI->Developers tools->Services tab and enter something like:
However, when I use a weather card, it does not matter which one, I only see the upcoming temperature but never precipation and preciptation probability.