In Home Assistant RC 2023.9, the HA team has changed forecasts from attributes to a service reply. This does have some upsides (no forecast spam in devtools, no duplicate weather entities for different forecasts, etc), but overall it’s a bad decision. Here are some reasons why it doesn’t make sense.
-
Service replies are used for responses from actions, such as generating an image based on a prompt. However forecasts are static, and fetching them doesn’t have any effects. See point #3 for the speed implications of this.
-
This breaks templating. You can’t get the forecast from a template because you can’t call a service from a template, as it doesn’t make sense for a template to perform an action. Now, you can technically get around this by creating an automation to fetch forecast data into an entity, but come on. This is just simulating the previous behavior to work around a bad decision.
-
I don’t have any data on this, but this seems intuitively bad for performance. Every time you have a weather card, it has to call the service to get the forecast (instead of just using the entity that’s already cached). Every time the service is called, either it has to re-fetch the data or use some sort of complicated cache. It would make more sense to just group updating the forecast in with updating the weather (how it is done now!)
-
Automations and templates that used only 1 line of code now need several automations and templates to accomplish a very simple task.
state_attr('weather.home', 'forecast')[1]['temperature']
The original post: