Automation does not return unavailable lights (in group)

Hi Folks,

I am using a similar telegram message about open windows, when I leave home (working well).

This one aims on making sure that my Tasmota lights are connected.

service: telegram_bot.send_message
data:
  message: >
    {% set w = expand('light.bambuslicht') | selectattr('state', 'eq',
    'unavailable') | map(attribute='name') | list %} {{ 'ACHTUNG!\nDie folgenden
    Lichter sind offline:\n' if w | count > 1 else 'ACHTUNG!\nDas folgende Licht
    ist offline:\n'}}{{ w | join('\n') }}

However, it does not return the unavailable lights - it works with states like on and off though
But unavailable is the exact state I can also see in the developers tools

Any suggestion?

EDIT:
It seems, that the state unavailable is somehow not propagated to the group :frowning:
Means: With single lights in state unavailable this very light is returned.
But even though the group’s state is unavailable, too, its members (also unavailable) are not returned.

Please post a screenshot of the entity’s state and its attributes (Developer Tools —> State).

Thank you for your help.
And sorry for the delay, but I did not get a notification about your post.

This is a different lamp (tasmota), but the same story:
The Burolicht (office light) is a group of two lights (Burolicht_l for left and …_r for right).

No problem.
I don’t see any group members in the attributes of Bürolicht that could be observed via expand. How did you create that group?

That’s interesting.
I just created it via UI by using “Group” (Type Light) and added the two lights in the screenshot below the Group:

(I still don’t get notifications - even though I was on “tracking” - so I will try “watching”

Test it with group members which are not unavailable.