@petro and @123 , please have a look here, has this been there all the time? seems quite an important feature in the templating tools we overlooked (so hence my tag, please don’t get mad)
I’m not mad but I haven’t been participating in this thread because I have little interest in the Light Group integration.
I have used expand extensively (its documentation seems adequate) but I have never used it with a Light Group, primarily because I don’t use Light Groups.
Maybe the example should be added to expand’s documentation?
well, I hadn’t noticed a change in the integration either, so probably yes…
However, nobody realized we could use the expand() on them in light groups… so the fact we can using entity_id is still very useful information. Must say I don’t understand the inner workings though, as I’ve only seen it being used on groups
You inspired me to search through all my posts where I had offered examples for the use of the expand function. The majority of them expand groups but a few expand a comma-delimited entities:
and a recent post expanded the entities attribute of a Light Group:
As mentioned, the documentation is good; it includes examples of expanding a mix of entities and groups. Perhaps I was more familiar with its abilities because I had created a Feature Request and then followed the PR that implemented it very closely (thank you Tho85). FWIW, it was a difficult nut to crack; it took about three versions before it worked correctly. During its long gestation, I saw the developer’s examples for its usage.
yes, I followed most of that, but admit having missed the expand on entities of the light group. I feel the documentation could benefit from an example how to iterate these using expand(), bot in the expand explanation in templates, and in the light.group docs though. Something like:
The entities configured in the light group are listed in the attribute entity_id which allows to iterate these entities in a Jinja template like using the expand() function on the light group:
Put it in the expand section in templating, not light group. Also, I would phrase it in a way that shows you can grab any entity_id list as an attribute for the expand function, using light group as an example.