I have no facts but this is based on my observation.
- Let's imagine we have 3 lights.
light.a,light.b,light.c, or shortera,bandc. - Let's create a group
light.group, and add lightsa,bandcinside. - Let's create a label
MyLightsand assign this label to all3lights
If I create the automation that targets entities separately, all is good, for example:
action: light.turn_on
target:
entity_id:
- light.a
- light.b
- light.c
This will do a for loop and loop each entity separately and send the same data to each light. So far so good.
for entity in entities_list: light_turn_on(data)
Then, let's address the group:
action: light.turn_on
target:
entity_id:
- light.group
According to my observation, this will do something like, kind-of pseudo code:
entities = get_entities_from_the_group
for entity in entities_list: light_turn_on(data)
But then when the selector is label
action: light.turn_on
target:
label_id:
- mylabel
I would expect that what happens is that we get entities that have the label set, or the entities of the specific domain that belong to device that has the label set:
entities = get_entities_with_label(mylabel) + get_entities_from_devices_with_label_and_domain(mylabel, 'light')
for entity in entities: light_turn_on(data)
.... Continuing in the comment because the post is too long ....