Open DirkMu opened 10 months ago
Hey there @phracturedblue, @tetienne, @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (template
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
template documentation template source (message by IssueLinks)
The documentation for how to use this is rather poor, so I'm not surprised that you are facing issues. It would be good to see an actual demo given in the documentation, particularly around the forecast templates.
Hi. Thanks for contributing. From my perspective this is not a fix. It just confirms my experience. Today, all templates are supposed to be defined below template. This is what the documentation says. https://www.home-assistant.io/integrations/template/
template:
- trigger:
- binary_sensor:
- sensor:
- weather:
This is what I understand is the recommended new way. Following that documentation the weather tamplate is not created and HA throws errors. The approach mentioned in the community post, from my perspective, is the old way. That is working form me, too.
I'd love to add to this, as I ran into the same issue. I believe DirkMu is correct - the "modern" template format is like so:
template:
- weather:
Legacy is:
weather:
- platform: template
We can be really sure of this because all the development for services which return a value (like, say, get forecasts) has been on this "modern" style. That's also why I've got a renewed interest in this issue. With the elimination of the previously-deprecated "forecast" attribute on Weather entities, it's no longer possible to use the legacy template with forecasts (without creating a template sensor to periodically pull the attribute into a sensor). Since it doesn't currently seem to be possible to use the "modern" format, users of Template Weather Providers are dead in the water in 2024.4.
It might be as simple as the documentation needing a little polish. But I haven't yet gotten to the bottom of it. I'll see if I can learn more.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Not stale
Issue still exists (HA v2024.8.1) - developers' response would be really appreciated.
The problem
Currently, when checking the documentation I see two ways to configure a weather template. Maybe I misinterpret it.
and
When using the first approach with all values defined HA trows an error:
What version of Home Assistant Core has the issue?
core-2023.10.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
template
Link to integration documentation on our website
https://www.home-assistant.io/integrations/template/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response