I’m trying to test templating in Devloper Tools → Template, and examples in this forums says things like:
{{
label_entities('Varme')
| list
}}
should work fine, but for me it returns nothing.
I have created a Label called Varme, and assigned to entities.
And would like to list those entities only.
The syntax is correct, are you certain the name is identical to your actual label name? The system is very forgiving with forgetting underscores for spaces and case sensitivity so the name seems to be the culprit.
if you pick one of the entities that should show up, and you do:
{{ 'light.entity_name' | labels }}
(replace light.entity_name with a real entity that has the ‘Varme’ label on it. ) what do you get?
you should get something like
['Varme']
if you don’t, the template isn’t the problem… if you do get a label, that’s the label verbatim that you need to use. give that a try and post what you get.
That did the trick.
It never occurred to me, or even heard of that there is a difference in labeling devices vs entities.
The device is also an entity, yes?