Expose template functions to retrieve icon from areas, devices and entities #388
Unanswered
dinhani
asked this question in
Template engine
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the enhancement
I would like to have functions like
area_icon,device_iconandentity_iconavailable in templates to retrieve the icon name defined in these components.Example usage
Current workarounds
Usually I created a dictionary inside the template mapping area names to the icons I want to use (the same defined in the official registry).
Anything else?
It seems this information is already available in the same entitities that functions like
area_name,device_nameandentity_nameuses to return these values, so maybe it is just creating the helper functions and exposing them to Jinja?Beta Was this translation helpful? Give feedback.
All reactions