From 6886fae74d0834a4ea49d818618617ad69f30e25 Mon Sep 17 00:00:00 2001 From: RoboMagus <68224306+RoboMagus@users.noreply.github.com> Date: Wed, 6 Mar 2024 12:07:58 +0100 Subject: [PATCH] Issues jinja template (#31712) --- .../_docs/configuration/templating.markdown | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/_docs/configuration/templating.markdown b/source/_docs/configuration/templating.markdown index ebd6bf6065b..f2bd16b9b7a 100644 --- a/source/_docs/configuration/templating.markdown +++ b/source/_docs/configuration/templating.markdown @@ -529,6 +529,25 @@ If there is more than one entry with the same title, the entities for all the ma {% endraw %} +### Issues + +- `issues()` returns all open issues as a mapping of (domain, issue_id) tuples to the issue object. +- `issue(domain, issue_id)` returns a specific issue for the provided domain and issue_id. + +#### Issues examples + +{% raw %} + +```text +{{ issues() }} # { ("homeassistant", "deprecated_yaml_ping"): {...}, ("cloud", "legacy_subscription"): {...} } +``` + +```text +{{ issue('homeassistant', 'python_version') }} # {"breaks_in_ha_version": "2024.4", "domain": "homeassistant", "issue_id": "python_version", "is_persistent": False, ...} +``` + +{% endraw %} + ### Immediate if (iif) A common case is to conditionally return a value based on another value.