Add label description to label templating

Current various label attributes are available via templates, but not the new(ish) description field. For example:

{{ labels() }}  # ['christmas_decorations', 'energy_saver', 'security']
{{ labels("living_room") }}  # ['christmas_decorations', 'energy_saver']
{{ labels("my_device_id") }}  # ['security']
{{ labels("light.christmas_tree") }}  # ['christmas_decorations']
{{ label_id('Energy saver') }}  # 'energy_saver'

etc…

I would like to be able to retrieve the description in a template e.g:

{{ label_decsription('energy_saver') }}  # 'Energy saver description'
2 Likes

Hi,

As labels icon and color retrieval seem also not to be implemented in template, is there any way to retrieve the json content of .storage/core.label_registry from templating code?

Best regards, Laurent.